On Wed, 18 Jan 2012 11:46:37 +0100, Janne Grunau <[email protected]> wrote:
> ---
>  libavformat/utils.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 373f068..67f702e 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -2133,7 +2133,7 @@ static int has_decode_delay_been_guessed(AVStream *st)
>  static int try_decode_frame(AVStream *st, AVPacket *avpkt, AVDictionary 
> **options)
>  {
>      AVCodec *codec;
> -    int got_picture = 1, ret = 0;
> +    int got_picture = 1, ret = 0, flushing = !avpkt->size;
>      AVFrame picture;
>      AVPacket pkt = *avpkt;
>  
> @@ -2169,6 +2169,8 @@ static int try_decode_frame(AVStream *st, AVPacket 
> *avpkt, AVDictionary **option
>                  st->info->nb_decoded_frames++;
>              pkt.data += ret;
>              pkt.size -= ret;
> +            if (flushing && !got_picture)
> +                ret = -1;
>          }
>      }
>      return ret;
> -- 
> 1.7.8.3
> 

LGTM

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

Reply via email to