On Tue, Oct 16, 2012 at 9:33 PM, Don Moir <[email protected]> wrote: > Also just don't use AV_SEEK_BYTE because you will end up with logic that is > worse. Most things like this lend themselves to timestamps anyway. But agree > there were several cases in the past that a seek returned 0 instead of -1 > when it failed but that has gotten better. Apparently not for AV_SEEK_BYTE > though.
FYI, I've reported it as ticket #1831: https://ffmpeg.org/trac/ffmpeg/ticket/1831 I ended up just reading the first packet in the file to know which stream it belongs to, and then seeking by that stream (and AVSEEK_FLAG_BACKWARD | AVSEEK_FLAG_ANY) to a very negative number to ensure it seeks backward to the very first packet. It seems to work for the time being. --Michael _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
