[FFmpeg-cvslog] assdec: fix wrong alloc pointer check.

Clément Bœsch git at videolan.org
Mon Jan 30 23:32:41 CET 2012


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Sun Jan 29 14:47:04 2012 +0100| [cc7342f712c0822c3e8f4c36fc55632c59aabac9] | committer: Clément Bœsch

assdec: fix wrong alloc pointer check.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cc7342f712c0822c3e8f4c36fc55632c59aabac9
---

 libavcodec/assdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/assdec.c b/libavcodec/assdec.c
index 087a0c8..c5f9cab 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;



More information about the ffmpeg-cvslog mailing list