]> git.sesse.net Git - ffmpeg/commit
flvdec: Check the avio_seek return value after reading a metadata packet
authorMartin Storsjö <martin@martin.st>
Sat, 2 Sep 2017 20:20:26 +0000 (23:20 +0300)
committerMartin Storsjö <martin@martin.st>
Mon, 4 Sep 2017 06:42:51 +0000 (09:42 +0300)
commit585dc1aecef0371ad6f16cb3750ae2a6da9cf00a
tree2a132f6c495be275068b6201f41dbbbbdb722395
parente12f1cd616573795681ce939113ac6cdad4c1f2b
flvdec: Check the avio_seek return value after reading a metadata packet

If the metadata packet is corrupted, flv_read_metabody can accidentally
read past the start of the next packet. If the start of the next packet
had been flushed out of the IO buffer, we would be unable to seek to
the right position (on a nonseekable stream).

Prefer to clearly error out instead of silently trying to read from a
desynced stream which will only be interpreted as garbage.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/flvdec.c