diff options
Diffstat (limited to 'libavcodec/avs.c')
-rw-r--r-- | libavcodec/avs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/avs.c b/libavcodec/avs.c index e3d2070..d5b2167 100644 --- a/libavcodec/avs.c +++ b/libavcodec/avs.c @@ -21,6 +21,7 @@ #include "avcodec.h" #include "get_bits.h" +#include "internal.h" typedef struct { @@ -59,11 +60,10 @@ avs_decode_frame(AVCodecContext * avctx, AvsBlockType type; GetBitContext change_map = {0}; //init to silence warning - if ((ret = avctx->reget_buffer(avctx, p)) < 0) { + if ((ret = ff_reget_buffer(avctx, p)) < 0) { av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); return ret; } - p->reference = 3; p->pict_type = AV_PICTURE_TYPE_P; p->key_frame = 0; @@ -151,7 +151,8 @@ avs_decode_frame(AVCodecContext * avctx, align_get_bits(&change_map); } - *picture = avs->picture; + if ((ret = av_frame_ref(picture, &avs->picture)) < 0) + return ret; *got_frame = 1; return buf_size; @@ -169,8 +170,7 @@ static av_cold int avs_decode_init(AVCodecContext * avctx) static av_cold int avs_decode_end(AVCodecContext *avctx) { AvsContext *s = avctx->priv_data; - if (s->picture.data[0]) - avctx->release_buffer(avctx, &s->picture); + av_frame_unref(&s->picture); return 0; } |