[libav-commits] mpegts: check substreams before discarding

Christian Schmidt git at libav.org
Wed Sep 12 23:46:58 CEST 2012


Module: libav
Branch: master
Commit: 07584eaf4a95db3f11d3bc411f9786932829e82b

Author:    Christian Schmidt <schmidt at digadd.de>
Committer: Luca Barbato <lu_zero at gentoo.org>
Date:      Thu Sep  6 16:43:24 2012 +0200

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>

---

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

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 libav-commits mailing list