diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-20 14:11:20 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-21 14:37:48 +0100 |
commit | b69183f65d0f6f4cd7a4e6c0deb57d59b0185aba (patch) | |
tree | c4bab8046dd5f4458c87d99a252510bb76a987e9 /libavformat | |
parent | be42c0b8d57fe2ea769892d102ffd5561dc18709 (diff) | |
download | ffmpeg-b69183f65d0f6f4cd7a4e6c0deb57d59b0185aba.tar.gz |
nutenc: check for negative index rather than assert
CC: libav-stable@libav.org
Bug-Id: CID 703721
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/nutenc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index b68e00ebbc..08907ef489 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -906,7 +906,10 @@ static int nut_write_packet(AVFormatContext *s, AVPacket *pkt) frame_code = i; } } - assert(frame_code != -1); + + if (frame_code < 0) + return AVERROR_BUG; + fc = &nut->frame_code[frame_code]; flags = fc->flags; needed_flags = get_needed_flags(nut, nus, fc, pkt); |