summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-10 23:20:57 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-16 02:37:26 +0100
commit8ff3fbf6bca0ee897e458fc27e5f967cdcbc16c7 (patch)
tree4d2c61f2c6c072df2be948ead15281c319406b92
parent6e02ca35e574c344ccdb3be9fd8817af50efabd1 (diff)
avcodec/decode: Reset *got_sub_ptr on error
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/decode.c4
1 files 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;
}
}