diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-02-09 15:20:36 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-02-09 15:24:28 +0100 |
commit | e1c1a6c874a8b394d262dae1b10fa91374fbd530 (patch) | |
tree | 821e8c369ded6a719379febff8f79664c8ac0422 /gst | |
parent | bcbdd12fb39d07b567580a87aa3b3254a928cf11 (diff) | |
download | gstreamer-plugins-bad-e1c1a6c874a8b394d262dae1b10fa91374fbd530.tar.gz |
mpegtsdemux: Never flush more bytes than available
This could happen if the input doesn't contain any MPEG TS
data and the complete adapter content should be skipped.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/mpegdemux/gstmpegtsdemux.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index 6cf37a67e..f6324ba99 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -662,7 +662,8 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id, template = klass->audio_template; name = g_strdup_printf ("audio_%04x", stream->PID); caps = gst_caps_new_simple ("audio/x-ac3", NULL); - } else if (gst_mpeg_descriptor_find (stream->ES_info, DESC_DVB_ENHANCED_AC3)) { + } else if (gst_mpeg_descriptor_find (stream->ES_info, + DESC_DVB_ENHANCED_AC3)) { template = klass->private_template; name = g_strdup_printf ("audio_%04x", stream->PID); caps = gst_caps_new_simple ("audio/x-eac3", NULL); @@ -2996,7 +2997,7 @@ done: if (G_UNLIKELY (!demux->packetsize)) gst_mpegts_demux_detect_packet_size (demux, sync_count); - *flush = ptr_data - in_data; + *flush = MIN (ptr_data - in_data, size); return sync_count; } |