[FFmpeg-devel] [PATCH] new -vlang option (FFmpeg)
Matthieu
mcrapet
Tue Dec 15 17:14:38 CET 2009
>
> BTW why not to set the language for a stream, i.e. why not simply a lang
> option?
As a user, having video options starting with v letter is less confusing.
That's my view.
Regards,
Matthieu
PS: According to your av_freep hint, you can consider:
---
diff --git a/ffmpeg.c b/ffmpeg.c
index 24e2664..ab62399 100755
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3182,8 +3182,7 @@ static void new_video_stream(AVFormatContext *oc)
nb_ocodecs++;
if (video_language) {
av_metadata_set(&st->metadata, "language", video_language);
- av_free(video_language);
- video_language = NULL;
+ av_freep(&video_language);
}
/* reset some key parameters */
@@ -3265,8 +3264,7 @@ static void new_audio_stream(AVFormatContext *oc)
audio_enc->time_base= (AVRational){1, audio_sample_rate};
if (audio_language) {
av_metadata_set(&st->metadata, "language", audio_language);
- av_free(audio_language);
- audio_language = NULL;
+ av_freep(&audio_language);
}
/* reset some key parameters */
@@ -3307,8 +3305,7 @@ static void new_subtitle_stream(AVFormatContext *oc)
if (subtitle_language) {
av_metadata_set(&st->metadata, "language", subtitle_language);
- av_free(subtitle_language);
- subtitle_language = NULL;
+ av_freep(&subtitle_language);
}
subtitle_disable = 0;
More information about the ffmpeg-devel
mailing list