[FFmpeg-devel] [PATCH 1/2] ffprobe: decode_video2 returning 0 means full packet.

Stefano Sabatini stefasab at gmail.com
Wed Jul 25 00:43:04 CEST 2012


On date Tuesday 2012-07-24 16:01:34 +0200, Nicolas George encoded:
> Fix a hang with alg-mm/ibmlogo.mm from FATE.
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  ffprobe.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/ffprobe.c b/ffprobe.c
> index 5b70348..9de0d59 100644
> --- a/ffprobe.c
> +++ b/ffprobe.c
> @@ -1665,6 +1665,8 @@ static av_always_inline int get_decoded_frame(AVFormatContext *fmt_ctx,
>          switch (dec_ctx->codec_type) {
>          case AVMEDIA_TYPE_VIDEO:
>              ret = avcodec_decode_video2(dec_ctx, frame, got_frame, pkt);
> +            if (!ret)
> +                ret = pkt->size;
>              break;

I'm not sure this should be addressed at the application level, in
case it is a bug we could log a comment in libavcodec and set
ret->pkt->size, and fix the decoders which show the problem (assuming
it *is* a decoder bug).
-- 
FFmpeg = Furious and Furious Minimalistic Programmable Eccentric Genius


More information about the ffmpeg-devel mailing list