avcodec/decode: Reset *got_sub_ptr on error

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/377/head
Andreas Rheinhardt 3 years ago
parent 6e02ca35e5
commit 8ff3fbf6bc
  1. 4
      libavcodec/decode.c

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

Loading…
Cancel
Save