[FFmpeg-cvslog] avconv: use correct index when selecting metadata to write to.

Anton Khirnov git at videolan.org
Mon Sep 12 00:39:00 CEST 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Sep  5 14:12:28 2011 +0200| [4bb3ae1eaa170add52232519c43226ef773c214f] | committer: Anton Khirnov

avconv: use correct index when selecting metadata to write to.

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

 avconv.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/avconv.c b/avconv.c
index 471ed00..74120c8 100644
--- a/avconv.c
+++ b/avconv.c
@@ -3571,14 +3571,14 @@ static void opt_output_file(void *optctx, const char *filename)
                 av_log(NULL, AV_LOG_ERROR, "Invalid stream index %d in metadata specifier.\n", index);
                 exit_program(1);
             }
-            m = &oc->streams[i]->metadata;
+            m = &oc->streams[index]->metadata;
             break;
         case 'c':
             if (index < 0 || index >= oc->nb_chapters) {
                 av_log(NULL, AV_LOG_ERROR, "Invalid chapter index %d in metadata specifier.\n", index);
                 exit_program(1);
             }
-            m = &oc->chapters[i]->metadata;
+            m = &oc->chapters[index]->metadata;
             break;
         default:
             av_log(NULL, AV_LOG_ERROR, "Invalid metadata specifier %s.\n", o->metadata[i].specifier);



More information about the ffmpeg-cvslog mailing list