On 2013-03-04 11:35:28 +0100, Anton Khirnov wrote:
> ---
>  libavcodec/h263dec.c |    9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
> index 7ab9ed2..20fa2f2 100644
> --- a/libavcodec/h263dec.c
> +++ b/libavcodec/h263dec.c
> @@ -358,7 +358,8 @@ uint64_t time= rdtsc();
>      if (buf_size == 0) {
>          /* special case for last picture */
>          if (s->low_delay==0 && s->next_picture_ptr) {
> -            *pict = s->next_picture_ptr->f;
> +            if ((ret = av_frame_ref(pict, &s->next_picture_ptr->f)) < 0)
> +                return ret;
>              s->next_picture_ptr= NULL;
>  
>              *got_frame = 1;
> @@ -721,10 +722,12 @@ intrax8_decoded:
>      assert(s->current_picture.f.pict_type == 
> s->current_picture_ptr->f.pict_type);
>      assert(s->current_picture.f.pict_type == s->pict_type);
>      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

Reply via email to