Hello FFmpeg Dev team, While integrating FFmpeg for M4A , MP4 stream & facing issue that mov demuxer trying to request seek for invalid seek offset. Issue details:- * Modified doc/examples/demuxing.c example to support Custom IO call-back because we have our own mechanism to read data from source * In custom IO seek call back , we do not support “whence” values AVSEEK_SIZE & SEEK_END , used to find stream size. * In Screen shot below , where we are observing seek with invalid seek offset and the seek requested after End of stream is detected * Seek offset value 9223372036854775799 always the same ( I think INT64_MAX – 8 , 8 is length Atom type & size field ) * If we allow to return proper stream size in seek callback then this problem is not observed. [cid:image003.png@01D84DDE.8B612E70] Fix : In attached patch to verify EOS condition before going to parse atom data. we are using FFmpeg tag n4.3.1 . Please take a look & provide your feedback . All regeneration test with https://samples.ffmpeg.org/ samples get passed on this patch. Regards Janpriya.