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

Michael Niedermayer git at videolan.org
Mon Nov 27 04:32:48 EET 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed Nov 22 12:16:57 2017 +0100| [883de7e8b4fee252464b15e0351c6e5733e36e54] | committer: Michael Niedermayer

libavformat/mov: Replace duplicate stream_nb check by assert

Reviewed-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/mov.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index ddb1e59b85..f6c86635b1 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2438,8 +2438,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;
 



More information about the ffmpeg-cvslog mailing list