History

nutenc: check for negative index rather than assert

Vittorio Giovara committed 12 years ago

Commit b69183f1 parent be42c0b1 file · +4 −1Browse files

Unified · Split

libavformat/nutenc.c+4−1
@@ -906,7 +906,10 @@ static int nut_write_packet(AVFormatContext *s, AVPacket *pkt) · 905 unmodified lines
906906 frame_code = i;
907907 }
908908 }
909− assert(frame_code != -1);
909+
910+ if (frame_code < 0)
911+ return AVERROR_BUG;
912+
910913 fc = &nut->frame_code[frame_code];
911914 flags = fc->flags;
912915 needed_flags = get_needed_flags(nut, nus, fc, pkt);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t