[FFmpeg-cvslog] avcodec/decode: Reset *got_sub_ptr on error
Andreas Rheinhardt
git at videolan.org
Thu Dec 16 04:02:03 EET 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Dec 10 23:20:57 2021 +0100| [8ff3fbf6bca0ee897e458fc27e5f967cdcbc16c7] | committer: Andreas Rheinhardt
avcodec/decode: Reset *got_sub_ptr on error
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8ff3fbf6bca0ee897e458fc27e5f967cdcbc16c7
---
libavcodec/decode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index afe2c0c3c1..0912f86a14 100644
--- a/libavcodec/decode.c
+++ b/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;
}
}
More information about the ffmpeg-cvslog
mailing list