]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/tmv.c
vorbis: Fix last quarter of CVE-2011-3893
[ffmpeg] / libavcodec / tmv.c
index 424cddf84d5ecba531aa3c583a33fef5c1d3e2c2..7eb9b6903ae91ffe8736058d4f4e55fbfbd7162f 100644 (file)
@@ -34,14 +34,6 @@ typedef struct TMVContext {
     AVFrame pic;
 } TMVContext;
 
-static av_cold int tmv_decode_init(AVCodecContext *avctx)
-{
-    TMVContext *tmv = avctx->priv_data;
-
-    avcodec_get_frame_defaults(&tmv->pic);
-    return 0;
-}
-
 static int tmv_decode_frame(AVCodecContext *avctx, void *data,
                             int *data_size, AVPacket *avpkt)
 {
@@ -90,6 +82,14 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data,
     return avpkt->size;
 }
 
+static av_cold int tmv_decode_init(AVCodecContext *avctx)
+{
+    TMVContext *tmv = avctx->priv_data;
+    avctx->pix_fmt = PIX_FMT_PAL8;
+    avcodec_get_frame_defaults(&tmv->pic);
+    return 0;
+}
+
 static av_cold int tmv_decode_close(AVCodecContext *avctx)
 {
     TMVContext *tmv = avctx->priv_data;