[FFmpeg-devel] [PATCH 09/28] if av_read_packet returns AVERROR_IO, we are done. ffmpeg's codecs might or might not handle returning any completed demuxed packets correctly

Reimar Döffinger Reimar.Doeffinger
Wed Jun 30 18:39:38 CEST 2010


On Wed, Jun 30, 2010 at 10:09:37AM +0100, Mans Rullgard wrote:
> From: Cory Fields <theuni-nospam- at xbmc.org>
> 
> ---
>  libavformat/utils.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 4ab18bb..09034bb 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -1105,6 +1105,8 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
>              if (ret < 0) {
>                  if (ret == AVERROR(EAGAIN))
>                      return ret;
> +                if (ret == AVERROR_IO)
> +                    return ret;
>                  /* return the last frames, if any */
>                  for(i = 0; i < s->nb_streams; i++) {
>                      st = s->streams[i];

That's wrong, we definitely should extract as much as possible
from the parser, particularly since I think some demuxers still
return AVERROR_IO on EOF.
If some decoders are broken, obviously the decoders need fixing...



More information about the ffmpeg-devel mailing list