OSDN Git Service

nutdec: minor simplification.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 28 Apr 2012 19:14:03 +0000 (21:14 +0200)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 29 Apr 2012 11:03:15 +0000 (13:03 +0200)
Also fixes an (incorrect) "control reaches end of non-void function"
warning with some compilers.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
libavformat/nutdec.c

index ddaa4b0..04e1dcf 100644 (file)
@@ -904,12 +904,10 @@ static int64_t nut_read_timestamp(AVFormatContext *s, int stream_index,
     av_assert0(nut->last_syncpoint_pos == *pos_arg);
 
     av_log(s, AV_LOG_DEBUG, "return %"PRId64" %"PRId64"\n", pts, back_ptr);
-    if (stream_index == -1)
-        return pts;
-    else if (stream_index == -2)
+    if (stream_index == -2)
         return back_ptr;
-
-    av_assert0(0);
+    av_assert0(stream_index == -1);
+    return pts;
 }
 
 static int read_seek(AVFormatContext *s, int stream_index,