[FFmpeg-devel] [PATCH] libavformat/mov: Replace duplicate stream_nb check by assert

Michael Niedermayer michael at niedermayer.cc
Wed Nov 22 14:04:34 EET 2017


Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavformat/mov.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 9e876efc8c..6940dfc7d5 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2437,8 +2437,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
     MOVStreamContext *sc;
     int pseudo_stream_id;
 
-    if (c->fc->nb_streams < 1)
-        return 0;
+    av_assert0 (c->fc->nb_streams >= 1);
     st = c->fc->streams[c->fc->nb_streams-1];
     sc = st->priv_data;
 
-- 
2.15.0



More information about the ffmpeg-devel mailing list