[FFmpeg-cvslog] Revert "ffmpeg: get rid of a pointless limit on number of streams."

Michael Niedermayer git at videolan.org
Sat Jul 16 19:34:54 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jul 16 19:24:10 2011 +0200| [c31a5b23b4cd566724743685e5ea158b0c818647] | committer: Michael Niedermayer

Revert "ffmpeg: get rid of a pointless limit on number of streams."

This reverts commit c7dd3e7e43555b2922481a9242a306c5b138d69c

Conflicts:

	ffmpeg.c

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

 ffmpeg.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 5548d41..85ead5b 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3220,6 +3220,9 @@ static int opt_input_ts_scale(const char *opt, const char *arg)
         p++;
     scale= strtod(p, &p);
 
+    if(stream >= MAX_STREAMS)
+        ffmpeg_exit(1);
+
     ts_scale = grow_array(ts_scale, sizeof(*ts_scale), &nb_ts_scale, stream + 1);
     ts_scale[stream] = scale;
     return 0;
@@ -3849,7 +3852,7 @@ static int opt_streamid(const char *opt, const char *arg)
         ffmpeg_exit(1);
     }
     *p++ = '\0';
-    idx = parse_number_or_die(opt, idx_str, OPT_INT, 0, INT_MAX);
+    idx = parse_number_or_die(opt, idx_str, OPT_INT, 0, MAX_STREAMS-1);
     streamid_map = grow_array(streamid_map, sizeof(*streamid_map), &nb_streamid_map, idx+1);
     streamid_map[idx] = parse_number_or_die(opt, p, OPT_INT, 0, INT_MAX);
     return 0;



More information about the ffmpeg-cvslog mailing list