aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-08-02 22:07:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-08-02 22:12:18 +0200
commit1d186e9e120d777cc9f5e68d2974d48bfbdd528e (patch)
tree571e05f6a9ba06c10729f67ccd29353c2b31aa19 /libavformat/utils.c
parent03cbe6c8bc42626107e75b001180b81781619ed7 (diff)
parent62ee0e6a977e1990c9853630c7dea1415b38bb28 (diff)
downloadffmpeg-1d186e9e120d777cc9f5e68d2974d48bfbdd528e.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: Revert "swscale: use 15-bit intermediates for 9/10-bit scaling." swscale: use 15-bit intermediates for 9/10-bit scaling. dct32: Add SSE2 ASM optimizations Correct chroma vector calculation for RealVideo 3. lavf: Add an option to discard corrupted frames mpegts: Mark wrongly-sized packets as corrupted mpegts: Move scan test to handle_packets mpegts: Mark corrupted packets mpegts: Reset continuity counter on seek mpegts: Fix for continuity counter mpegts: Silence "can't seek" warning on unseekable apichange: add an entry for AV_PKT_FLAG_CORRUPT avpacket: signal possibly corrupted packets mpeg4videodec: remove dead code that would have detected erroneous encoding aac: Remove some suspicious illegal memcpy()s from LTP. bink: Eliminate unnecessary shadow declaration. Conflicts: doc/APIchanges libavcodec/version.h libavformat/avformat.h libavformat/options.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 81577c9158..aa1220dbbc 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -738,8 +738,17 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt)
continue;
}
+ if ((s->flags & AVFMT_FLAG_DISCARD_CORRUPT) &&
+ (pkt->flags & AV_PKT_FLAG_CORRUPT)) {
+ av_log(s, AV_LOG_WARNING,
+ "Dropped corrupted packet (stream = %d)\n",
+ pkt->stream_index);
+ continue;
+ }
+
if(!(s->flags & AVFMT_FLAG_KEEP_SIDE_DATA))
av_packet_merge_side_data(pkt);
+
st= s->streams[pkt->stream_index];
switch(st->codec->codec_type){