[FFmpeg-devel] [PATCH] avformat/dvdvideodec: check return code of ff_dvdclut_yuv_to_rgb()
Marth64
marth64 at proxyid.net
Wed Nov 27 19:13:44 EET 2024
Signed-off-by: Marth64 <marth64 at proxyid.net>
---
libavformat/dvdvideodec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c
index 4d11480dfd..9c7b224a78 100644
--- a/libavformat/dvdvideodec.c
+++ b/libavformat/dvdvideodec.c
@@ -1299,6 +1299,7 @@ static int dvdvideo_subp_stream_analyze(AVFormatContext *s, uint32_t offset, sub
{
DVDVideoDemuxContext *c = s->priv_data;
+ int ret;
char lang_dvd[3] = {0};
entry->startcode = 0x20 + (offset & 0x1F);
@@ -1310,7 +1311,9 @@ static int dvdvideo_subp_stream_analyze(AVFormatContext *s, uint32_t offset, sub
/* dvdsub palettes currently have no colorspace tagging and all muxers only support RGB */
/* this is not a lossless conversion, but no use cases are supported for the original YUV */
- ff_dvdclut_yuv_to_rgb(entry->clut, FF_DVDCLUT_CLUT_SIZE);
+ ret = ff_dvdclut_yuv_to_rgb(entry->clut, FF_DVDCLUT_CLUT_SIZE);
+ if (ret < 0)
+ return ret;
AV_WB16(lang_dvd, subp_attr.lang_code);
entry->lang_iso = ff_convert_lang_to(lang_dvd, AV_LANG_ISO639_2_BIBL);
--
2.34.1
More information about the ffmpeg-devel
mailing list