Commit 740e5d39 authored by cehoyos's avatar cehoyos

Simplify freeing of audio_language and subtitle_language.

Patch by Matthieu, mcrapet gmail com 


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20875 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ea73edb8
......@@ -3259,8 +3259,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 */
......@@ -3301,8 +3300,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment