From f9dfc44a67320b6f73bb34e05ec80e67e9c8c087 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 11 May 2009 16:59:20 +0200 Subject: 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. --- gst/mpegdemux/gstmpegtsdemux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gst/mpegdemux/gstmpegtsdemux.h') 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; -- cgit v1.2.1