[FFmpeg-devel] [PATCH 2/3] lavf/avidec: don't treat I/O errors as EOF

Michael Niedermayer michael at niedermayer.cc
Thu Nov 29 19:12:59 EET 2018


On Wed, Nov 28, 2018 at 01:19:58AM -0600, Rodger Combs wrote:
> ---
>  libavformat/avidec.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/avidec.c b/libavformat/avidec.c
> index 3f074795a7..1d131b299c 100644
> --- a/libavformat/avidec.c
> +++ b/libavformat/avidec.c
> @@ -1383,8 +1383,8 @@ static int ni_prepare_read(AVFormatContext *s)
>      if (i >= 0) {
>          int64_t pos = best_st->index_entries[i].pos;
>          pos += best_ast->packet_size - best_ast->remaining;
> -        if (avio_seek(s->pb, pos + 8, SEEK_SET) < 0)
> -          return AVERROR_EOF;
> +        if ((pos = avio_seek(s->pb, pos + 8, SEEK_SET)) < 0)
> +          return pos;

should be ok if tested with a case that triggers this codepath

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20181129/732eb8d9/attachment.sig>


More information about the ffmpeg-devel mailing list