[FFmpeg-devel] ASF EOF detection

Vinod G design4mmedia
Fri Dec 21 21:17:39 CET 2007

When end of ASF file is reached, only AVERROR_IO returned, with no
indication of EOF in ByteIOContext.eof_reached.

Is the mod given below the correct place to add this detection:

static int asf_read_packet(AVFormatContext *s, AVPacket *pkt)

            asf->packet_pos= url_ftell(&s->pb);
            if (asf->data_object_size != (uint64_t)-1 &&
                (asf->packet_pos - asf->data_object_offset >=
                pb->eof_reached = 1;
                return AVERROR_IO; /* Do not exceed the size of the data
object */


More information about the ffmpeg-devel mailing list