summaryrefslogtreecommitdiff
path: root/libavformat/mxf.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-06 13:40:29 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-06 13:40:29 +0000
commit72d334cab448864de018aa569c1b82c212362085 (patch)
treeb3cdf1af825054c67b00b55400ccea2f1de1d176 /libavformat/mxf.c
parent8055ede6c74233347ae87aabe8d5f3532b3a9a92 (diff)
support AVDISCARD_ALL
Originally committed as revision 12350 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mxf.c')
-rw-r--r--libavformat/mxf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/mxf.c b/libavformat/mxf.c
index 0c69cd2e12..5a824acdf3 100644
--- a/libavformat/mxf.c
+++ b/libavformat/mxf.c
@@ -353,6 +353,8 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
url_fskip(s->pb, klv.length);
return -1;
}
+ if (s->streams[index]->discard == AVDISCARD_ALL)
+ goto skip;
/* check for 8 channels AES3 element */
if (klv.key[12] == 0x06 && klv.key[13] == 0x01 && klv.key[14] == 0x10) {
if (mxf_get_d10_aes3_packet(s->pb, s->streams[index], pkt, klv.length) < 0) {
@@ -365,6 +367,7 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->pos = klv.offset;
return 0;
} else
+ skip:
url_fskip(s->pb, klv.length);
}
return AVERROR(EIO);