Browse Source

nutenc: check for negative index rather than assert

CC: libav-stable@libav.org
Bug-Id: CID 703721
tags/n2.5
Vittorio Giovara 10 years ago
parent
commit
b69183f65d
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavformat/nutenc.c

+ 4
- 1
libavformat/nutenc.c View File

@@ -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);


Loading…
Cancel
Save