[FFmpeg-cvslog] mpegts: check substreams before discarding

Christian Schmidt git at videolan.org
Thu Sep 13 15:29:03 CEST 2012


ffmpeg | branch: master | Christian Schmidt <schmidt at digadd.de> | Thu Sep  6 16:43:24 2012 +0200| [07584eaf4a95db3f11d3bc411f9786932829e82b] | committer: Luca Barbato

mpegts: check substreams before discarding

Allow to extract the AC3 core from TrueHD with the "copy" codec.

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=07584eaf4a95db3f11d3bc411f9786932829e82b
---

 libavformat/mpegts.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 40a983b..a3d5e8e 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -784,7 +784,8 @@ static int mpegts_push_data(MpegTSFilter *filter,
                     code = pes->header[3] | 0x100;
                     av_dlog(pes->stream, "pid=%x pes_code=%#x\n", pes->pid, code);
 
-                    if ((pes->st && pes->st->discard == AVDISCARD_ALL) ||
+                    if ((pes->st && pes->st->discard == AVDISCARD_ALL &&
+                         (!pes->sub_st || pes->sub_st->discard == AVDISCARD_ALL)) ||
                         code == 0x1be) /* padding_stream */
                         goto skip;
 



More information about the ffmpeg-cvslog mailing list