avformat/dvdvideodec: check return code of ff_dvdclut_yuv_to_rgb()
Signed-off-by: Marth64 <marth64@proxyid.net>
This commit is contained in:
parent
a5a899bfcb
commit
e256761def
1 changed files with 4 additions and 1 deletions
|
|
@ -1299,6 +1299,7 @@ static int dvdvideo_subp_stream_analyze(AVFormatContext *s, uint32_t offset, sub
|
||||||
{
|
{
|
||||||
DVDVideoDemuxContext *c = s->priv_data;
|
DVDVideoDemuxContext *c = s->priv_data;
|
||||||
|
|
||||||
|
int ret;
|
||||||
char lang_dvd[3] = {0};
|
char lang_dvd[3] = {0};
|
||||||
|
|
||||||
entry->startcode = 0x20 + (offset & 0x1F);
|
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 */
|
/* 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 */
|
/* 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);
|
AV_WB16(lang_dvd, subp_attr.lang_code);
|
||||||
entry->lang_iso = ff_convert_lang_to(lang_dvd, AV_LANG_ISO639_2_BIBL);
|
entry->lang_iso = ff_convert_lang_to(lang_dvd, AV_LANG_ISO639_2_BIBL);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue