assdec: fix wrong alloc pointer check.

pull/3/merge
Clément Bœsch 13 years ago
parent 7c0d30b57b
commit cc7342f712
  1. 2
      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;

Loading…
Cancel
Save