From cc7342f712c0822c3e8f4c36fc55632c59aabac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Sun, 29 Jan 2012 14:47:04 +0100 Subject: [PATCH] assdec: fix wrong alloc pointer check. --- libavcodec/assdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/assdec.c b/libavcodec/assdec.c index 087a0c839b..c5f9cab6e0 100644 --- a/libavcodec/assdec.c +++ b/libavcodec/assdec.c @@ -26,7 +26,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;