diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-05-01 00:58:27 +0400 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-05-02 01:20:52 +0400 |
commit | 7effbee66cf457c62f795d9b9ed3a1110b364b89 (patch) | |
tree | a406f659aff1b694e66774acb77ec856024d81d8 /libavformat/aiffdec.c | |
parent | 75f847aa6b1bc88733e59d680809f614977b4c07 (diff) |
Mark truncated packets as corrupt in av_get_packet.
Manually remove that flag again for formats that read an arbitrary
amount of data and thus truncation is not an error.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavformat/aiffdec.c')
-rw-r--r-- | libavformat/aiffdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index c94863c285..4083316450 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -322,6 +322,8 @@ static int aiff_read_packet(AVFormatContext *s, if (res < 0) return res; + if (size >= st->codec->block_align) + pkt->flags &= ~AV_PKT_FLAG_CORRUPT; /* Only one stream in an AIFF file */ pkt->stream_index = 0; pkt->duration = (res / st->codec->block_align) * aiff->block_duration; |