Quoting Vittorio Giovara (2014-10-30 01:51:53)
> CC: [email protected]
> Bug-Id: CID 29387
> ---
>  libavcodec/motion_est.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
> index a765b26..1aa12f3 100644
> --- a/libavcodec/motion_est.c
> +++ b/libavcodec/motion_est.c
> @@ -805,6 +805,8 @@ static int interlaced_search(MpegEncContext *s, int 
> ref_index,
>                  best_field= field_select;
>              }
>          }
> +        if (best_field < 0)
> +            return AVERROR_INVALIDDATA;
>          {
>              int16_t (*mv_table)[2]= mv_tables[block][best_field];
>  
> -- 
> 1.9.3 (Apple Git-50)
> 

I do not think this can happen. And even if it does, it would mean that
some other code went horribly wrong, so a check here does not do
anything useful.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to