avformat/avienc: Correct possible dereference of null

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Roman Savchenko
2015-05-29 00:04:41 +02:00
committed by Michael Niedermayer
parent e2f3ea1cbb
commit e85d91da48
+2
View File
@@ -386,6 +386,8 @@ static int avi_write_header(AVFormatContext *s)
t = NULL;
if (langstr) {
char* str = av_asprintf("Subtitle - %s-xx;02", langstr);
if (!str)
return AVERROR(ENOMEM);
ff_riff_write_info_tag(s->pb, "strn", str);
av_free(str);
}