avformat/nutdec: Check ff_gen_search() for failure
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 1 Jul 2015 12:28:41 +0000 (14:28 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 1 Jul 2015 12:28:41 +0000 (14:28 +0200)
Fixes assertion failure

Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/nutdec.c

index 606deaa..63b0cd2 100644 (file)
@@ -1280,6 +1280,8 @@ static int read_seek(AVFormatContext *s, int stream_index,
                             next_node[1]->pos, next_node[1]->pos,
                             next_node[0]->ts, next_node[1]->ts,
                             AVSEEK_FLAG_BACKWARD, &ts, nut_read_timestamp);
+        if (pos < 0)
+            return pos;
 
         if (!(flags & AVSEEK_FLAG_BACKWARD)) {
             dummy.pos    = pos + 16;