mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-25 04:19:05 +00:00
assdec: fix wrong alloc pointer check.
This commit is contained in:
parent
7c0d30b57b
commit
cc7342f712
@ -26,7 +26,7 @@
|
|||||||
static av_cold int ass_decode_init(AVCodecContext *avctx)
|
static av_cold int ass_decode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
avctx->subtitle_header = av_malloc(avctx->extradata_size);
|
avctx->subtitle_header = av_malloc(avctx->extradata_size);
|
||||||
if (!avctx->extradata)
|
if (!avctx->subtitle_header)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size);
|
memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size);
|
||||||
avctx->subtitle_header_size = avctx->extradata_size;
|
avctx->subtitle_header_size = avctx->extradata_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user