[FFmpeg-cvslog] avformat/dvdvideodec: check return code of ff_dvdclut_yuv_to_rgb()
Marth64
git at videolan.org
Wed Jan 8 07:46:43 EET 2025
ffmpeg | branch: release/7.1 | Marth64 <marth64 at proxyid.net> | Wed Nov 27 11:13:44 2024 -0600| [a6d4bac44d2d7f034027fadb4920830d521b4190] | committer: Marth64
avformat/dvdvideodec: check return code of ff_dvdclut_yuv_to_rgb()
Signed-off-by: Marth64 <marth64 at proxyid.net>
(cherry picked from commit e256761defe527c81521ae035ae3ee6f16265707)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a6d4bac44d2d7f034027fadb4920830d521b4190
---
libavformat/dvdvideodec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c
index 9916351e86..f92c5ae54a 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);
More information about the ffmpeg-cvslog
mailing list