mpegpsdemux: Flush program end code bytes

This should not harm regular files, since those are the last 4 bytes of
a normal file.

This allows to handle playback of concatenated mpeg-ps files. Seeking and
duration reporting is still wrong though.
This commit is contained in:
Edward Hervey 2014-04-23 10:42:45 +02:00
parent 0662248347
commit f982feb1d9

View file

@ -3160,6 +3160,9 @@ gst_flups_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
ret = gst_flups_demux_parse_sys_head (demux);
break;
case ID_PS_END_CODE:
/* Skip final 4 bytes */
gst_adapter_flush (demux->adapter, 4);
ADAPTER_OFFSET_FLUSH (4);
ret = GST_FLOW_OK;
goto done;
case ID_PS_PROGRAM_STREAM_MAP: