Hi,

On Mon, Jul 11, 2011 at 3:02 PM, Diego Biurrun <[email protected]> wrote:
> Error checking is already done by inspecting the got_picture/got_subtitle
> parameters.  This fixes some warnings about unused-but-set variables.
> ---
>  ffplay.c |   14 ++++++--------
>  1 files changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/ffplay.c b/ffplay.c
> index 7e61fb1..bbbf5c6 100644
> --- a/ffplay.c
> +++ b/ffplay.c
> @@ -1457,7 +1457,7 @@ static int output_picture2(VideoState *is, AVFrame 
> *src_frame, double pts1, int6
>
>  static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, 
> AVPacket *pkt)
>  {
> -    int len1, got_picture, i;
> +    int got_picture, i;
>
>     if (packet_queue_get(&is->videoq, pkt, 1) < 0)
>         return -1;
> @@ -1485,9 +1485,7 @@ static int get_video_frame(VideoState *is, AVFrame 
> *frame, int64_t *pts, AVPacke
>         return 0;
>     }
>
> -    len1 = avcodec_decode_video2(is->video_st->codec,
> -                                 frame, &got_picture,
> -                                 pkt);
> +    avcodec_decode_video2(is->video_st->codec, frame, &got_picture, pkt);

The commit msg doesn't match the patch. got_picture != len1.
got_picture checks whether there was a frame. len checks whether
decoding consumed data and whether an error occurred.

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

Reply via email to