]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/tmv.c
Merge remote branch 'qatar/master'
[ffmpeg] / libavcodec / tmv.c
index ee5d0605251840cd5fd75a374dc7a8616e9d6a55..b1083fe682192976c1ac20eb7459efef6b5b06f4 100644 (file)
@@ -34,6 +34,14 @@ 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)
 {
@@ -97,6 +105,7 @@ AVCodec ff_tmv_decoder = {
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_TMV,
     .priv_data_size = sizeof(TMVContext),
+    .init           = tmv_decode_init,
     .close          = tmv_decode_close,
     .decode         = tmv_decode_frame,
     .capabilities   = CODEC_CAP_DR1,