diff options
author | Edward Hervey <edward@collabora.com> | 2014-04-23 10:42:45 +0200 |
---|---|---|
committer | Edward Hervey <edward@collabora.com> | 2014-04-23 10:46:20 +0200 |
commit | f982feb1d9251d79cb550687fc9d878c67b91089 (patch) | |
tree | ff98a65f2ba50486f3e1dc94169f7b649e83e294 | |
parent | 066224834725294443ceb049bb18941bc7a135f9 (diff) | |
download | gstreamer-plugins-bad-f982feb1d9251d79cb550687fc9d878c67b91089.tar.gz |
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.
-rw-r--r-- | gst/mpegdemux/gstmpegdemux.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index 78a262339..b360dc161 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: |