summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/assdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/assdec.c b/libavcodec/assdec.c
index 7a69582aa2..48fe32ee99 100644
--- a/libavcodec/assdec.c
+++ b/libavcodec/assdec.c
@@ -29,7 +29,7 @@
static av_cold int ass_decode_init(AVCodecContext *avctx)
{
avctx->subtitle_header = av_malloc(avctx->extradata_size);
- if (!avctx->extradata)
+ if (!avctx->subtitle_header)
return AVERROR(ENOMEM);
memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size);
avctx->subtitle_header_size = avctx->extradata_size;