]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dvdsubdec.c
wmall: fix return type of dump_int_buffer()
[ffmpeg] / libavcodec / dvdsubdec.c
index 9eb5665c9ddaa6287a18eeadc2644d934be647fc..f4b54396d9c0c68e68a12eb545637eaffb4cf50d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * DVD subtitle decoding for ffmpeg
+ * DVD subtitle decoding
  * Copyright (c) 2005 Fabrice Bellard
  *
  * This file is part of FFmpeg.
@@ -516,12 +516,12 @@ static int dvdsub_decode(AVCodecContext *avctx,
 static int dvdsub_init(AVCodecContext *avctx)
 {
     DVDSubContext *ctx = (DVDSubContext*) avctx->priv_data;
-    char *data;
+    char *dataorig, *data;
 
     if (!avctx->extradata || !avctx->extradata_size)
         return 1;
 
-    data = av_malloc(avctx->extradata_size+1);
+    dataorig = data = av_malloc(avctx->extradata_size+1);
     if (!data)
         return AVERROR(ENOMEM);
     memcpy(data, avctx->extradata, avctx->extradata_size);
@@ -555,7 +555,7 @@ static int dvdsub_init(AVCodecContext *avctx)
         av_log(avctx, AV_LOG_DEBUG, "\n");
     }
 
-    av_free(data);
+    av_free(dataorig);
     return 1;
 }