ffmpeg | branch: master | Vittorio Giovara <vittorio.giov...@gmail.com> | Mon 
Oct 20 14:11:20 2014 +0100| [b69183f65d0f6f4cd7a4e6c0deb57d59b0185aba] | 
committer: Vittorio Giovara

nutenc: check for negative index rather than assert

CC: libav-sta...@libav.org
Bug-Id: CID 703721

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b69183f65d0f6f4cd7a4e6c0deb57d59b0185aba
---

 libavformat/nutenc.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index b68e00e..08907ef 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);

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to