summaryrefslogtreecommitdiffstats
path: root/gst/mpegdemux/gstmpegtsdemux.h
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2009-05-11 16:59:20 +0200
committerEdward Hervey <bilboed@bilboed.com>2009-05-11 16:59:20 +0200
commitf9dfc44a67320b6f73bb34e05ec80e67e9c8c087 (patch)
treed6087e6ff7e57a543e65a2ddd7806c75293fd10d /gst/mpegdemux/gstmpegtsdemux.h
parentbc062b9acf1232ee5643dd7976741c7a47378cd6 (diff)
downloadgst-plugins-bad-f9dfc44a67320b6f73bb34e05ec80e67e9c8c087.tar.gz
gst-plugins-bad-f9dfc44a67320b6f73bb34e05ec80e67e9c8c087.tar.bz2
gst-plugins-bad-f9dfc44a67320b6f73bb34e05ec80e67e9c8c087.zip
mpegtsdemux: Protect bitrate estimation against bogus values.
If the estimated bitrate is lower than 188 bytes, there's most likely something completely wrong with the two samples. If that happens, force recalculation. Use guint64 for observation PCR, I saw cases where it would overflow.
Diffstat (limited to 'gst/mpegdemux/gstmpegtsdemux.h')
-rw-r--r--gst/mpegdemux/gstmpegtsdemux.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/mpegdemux/gstmpegtsdemux.h b/gst/mpegdemux/gstmpegtsdemux.h
index 2e2a8e63..dad2b023 100644
--- a/gst/mpegdemux/gstmpegtsdemux.h
+++ b/gst/mpegdemux/gstmpegtsdemux.h
@@ -213,7 +213,7 @@ struct _GstMpegTSDemux {
gint64 bitrate;
/* Two PCRs observations to calculate bitrate */
- gint64 pcr[2];
+ guint64 pcr[2];
/* Cached duration estimation */
GstClockTime cache_duration;