Commit cc7342f7 authored by Clément Bœsch's avatar Clément Bœsch

assdec: fix wrong alloc pointer check.

parent 7c0d30b5
...@@ -26,7 +26,7 @@ ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment