1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/decode: Reset *got_sub_ptr on error

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-12-10 23:20:57 +01:00
parent 6e02ca35e5
commit 8ff3fbf6bc

View File

@ -862,8 +862,8 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
"Invalid UTF-8 in decoded subtitles text; " "Invalid UTF-8 in decoded subtitles text; "
"maybe missing -sub_charenc option\n"); "maybe missing -sub_charenc option\n");
avsubtitle_free(sub); avsubtitle_free(sub);
ret = AVERROR_INVALIDDATA; *got_sub_ptr = 0;
break; return AVERROR_INVALIDDATA;
} }
} }