[FFmpeg-devel] [PATCH 2/3] avcodec/utils: EAGAIN from the old decode API consumes a packet

Michael Niedermayer michael at niedermayer.cc
Tue Apr 19 18:43:31 CEST 2016


On Tue, Apr 19, 2016 at 11:49:12AM +0200, wm4 wrote:
> This affects the wrapper for the old decode API. The new decode API uses
> EAGAIN to signal that a packet must be sent again, while the old API
> considers the packet fully consumed (and it's also not an error).
> 
> This affects e.g.: tickets/574/Issue200Regression.latm
> ---
> Can be squashed with previous commit if desired.
> ---
>  libavcodec/utils.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index b9162b2..0ccede1 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -2724,6 +2724,9 @@ static int do_decode(AVCodecContext *avctx, AVPacket *pkt)
>          ret = AVERROR(EINVAL);
>      }
>  
> +    if (ret == AVERROR(EAGAIN))
> +        ret = pkt->size;
> +

should be ok
alternativly all decoders could be changed not to return EAGAIN
iam not sure any other than latm do that

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160419/95846c54/attachment.sig>


More information about the ffmpeg-devel mailing list