On 2013-03-04 11:35:25 +0100, Anton Khirnov wrote:
> ---
> libavcodec/rv10.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
> index e872d24..562e5d7 100644
> --- a/libavcodec/rv10.c
> +++ b/libavcodec/rv10.c
> @@ -643,7 +643,7 @@ static int rv10_decode_frame(AVCodecContext *avctx,
> const uint8_t *buf = avpkt->data;
> int buf_size = avpkt->size;
> MpegEncContext *s = avctx->priv_data;
> - int i;
> + int i, ret;
> AVFrame *pict = data;
> int slice_count;
> const uint8_t *slices_hdr = NULL;
> @@ -700,10 +700,12 @@ static int rv10_decode_frame(AVCodecContext *avctx,
> ff_MPV_frame_end(s);
>
> if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
> - *pict = s->current_picture_ptr->f;
> + if ((ret = av_frame_ref(pict, &s->current_picture_ptr->f)) < 0)
> + return ret;
> ff_print_debug_info(s, s->current_picture_ptr);
> } else if (s->last_picture_ptr != NULL) {
> - *pict = s->last_picture_ptr->f;
> + if ((ret = av_frame_ref(pict, &s->last_picture_ptr->f)) < 0)
> + return ret;
> ff_print_debug_info(s, s->last_picture_ptr);
> }
ok
Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel