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.
This commit is contained in:
parent
bcbdd12fb3
commit
e1c1a6c874
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user