summaryrefslogtreecommitdiff
path: root/gst/mpegdemux
diff options
context:
space:
mode:
authorEdward Hervey <edward@collabora.com>2014-04-23 10:42:45 +0200
committerEdward Hervey <edward@collabora.com>2014-04-23 10:46:20 +0200
commitf982feb1d9251d79cb550687fc9d878c67b91089 (patch)
treeff98a65f2ba50486f3e1dc94169f7b649e83e294 /gst/mpegdemux
parent066224834725294443ceb049bb18941bc7a135f9 (diff)
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.
Diffstat (limited to 'gst/mpegdemux')
-rw-r--r--gst/mpegdemux/gstmpegdemux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
index 78a2623390..b360dc1616 100644
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -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: