X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Ftmv.c;h=b1083fe682192976c1ac20eb7459efef6b5b06f4;hb=c137fdd778e1bb82c2f0d7fa4a88adc97058d6d4;hp=62b6e19de107c1cbaa738c743fbf9426017c63d4;hpb=efb5fa79f5ca34140db357a00c999286097ab53e;p=ffmpeg diff --git a/libavcodec/tmv.c b/libavcodec/tmv.c index 62b6e19de10..b1083fe6821 100644 --- a/libavcodec/tmv.c +++ b/libavcodec/tmv.c @@ -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) { @@ -59,7 +67,7 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data, return -1; } - tmv->pic.pict_type = FF_I_TYPE; + tmv->pic.pict_type = AV_PICTURE_TYPE_I; tmv->pic.key_frame = 1; dst = tmv->pic.data[0]; @@ -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,