Re: [FFmpeg-devel] EOF and IO error checking

2019-08-23 Thread Michael Niedermayer
On Thu, Aug 22, 2019 at 10:47:17AM +0200, Marton Balint wrote: > > > On Sun, 18 Aug 2019, Michael Niedermayer wrote: > > >On Sat, Aug 17, 2019 at 09:10:59PM +0200, Marton Balint wrote: > >>Hi, > >> > >>As you might now avio_feof() returns true both in case of actual EOF and in > >>case of IO

Re: [FFmpeg-devel] EOF and IO error checking

2019-08-22 Thread James Almer
On 8/17/2019 4:10 PM, Marton Balint wrote: > Hi, > > As you might now avio_feof() returns true both in case of actual EOF and > in case of IO errors. > > Some demuxers (matroska) have special handling for this exact reason, e.g.: > > if (avio_feof(pb)) { >     if (pb->error) { >     return

Re: [FFmpeg-devel] EOF and IO error checking

2019-08-22 Thread Marton Balint
On Sun, 18 Aug 2019, Michael Niedermayer wrote: On Sat, Aug 17, 2019 at 09:10:59PM +0200, Marton Balint wrote: Hi, As you might now avio_feof() returns true both in case of actual EOF and in case of IO errors. Some demuxers (matroska) have special handling for this exact reason, e.g.: if

Re: [FFmpeg-devel] EOF and IO error checking

2019-08-18 Thread Michael Niedermayer
On Sat, Aug 17, 2019 at 09:10:59PM +0200, Marton Balint wrote: > Hi, > > As you might now avio_feof() returns true both in case of actual EOF and in > case of IO errors. > > Some demuxers (matroska) have special handling for this exact reason, e.g.: > > if (avio_feof(pb)) { > if (pb->error)

[FFmpeg-devel] EOF and IO error checking

2019-08-17 Thread Marton Balint
Hi, As you might now avio_feof() returns true both in case of actual EOF and in case of IO errors. Some demuxers (matroska) have special handling for this exact reason, e.g.: if (avio_feof(pb)) { if (pb->error) { return pb->error; } else { return AVERROR_EOF; }