[FFmpeg-cvslog] ffmpeg/opt_output_file: extract subtitle codec name through new API

Michael Niedermayer git at videolan.org
Sat Sep 22 19:11:56 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Sep 22 18:57:47 2012 +0200| [8ccb56abeeecb71a6e77ecc8cbb5370ee993176a] | committer: Michael Niedermayer

ffmpeg/opt_output_file: extract subtitle codec name through new API

This should fix specifying subtitle codecs with the new syntax in some cases.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 ffmpeg_opt.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 2e94686..e759125 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -1496,6 +1496,7 @@ void opt_output_file(void *optctx, const char *filename)
             }
         }
     } else if (!o->nb_stream_maps) {
+        char *subtitle_codec_name = NULL;
         /* pick the "best" stream of each type */
 
         /* video: highest resolution */
@@ -1532,6 +1533,7 @@ void opt_output_file(void *optctx, const char *filename)
         }
 
         /* subtitles: pick first */
+        MATCH_PER_TYPE_OPT(codec_names, str, subtitle_codec_name, oc, "s");
         if (!o->subtitle_disable && (oc->oformat->subtitle_codec != AV_CODEC_ID_NONE || subtitle_codec_name)) {
             for (i = 0; i < nb_input_streams; i++)
                 if (input_streams[i]->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {



More information about the ffmpeg-cvslog mailing list