[FFmpeg-devel] [PATCH 1/3] ffmpeg: Set audio/video_codec_name when codecs are automatically chosen

Alexander Strange astrange
Mon Nov 8 05:44:05 CET 2010


---
 ffmpeg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index fc1d52b..a48a0f2 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3301,6 +3301,7 @@ static void new_video_stream(AVFormatContext *oc, int file_idx)
         } else {
             codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO);
             codec = avcodec_find_encoder(codec_id);
+            video_codec_name = av_strdup(codec->name);
         }
     }
 
@@ -3447,6 +3448,7 @@ static void new_audio_stream(AVFormatContext *oc, int file_idx)
         } else {
             codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_AUDIO);
             codec = avcodec_find_encoder(codec_id);
+            audio_codec_name = av_strdup(codec->name);
         }
     }
 
-- 
1.7.3.1




More information about the ffmpeg-devel mailing list