]> git.sesse.net Git - ffmpeg/commit
avformat/rmdec: Actually return value < 0 on read_header failure
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 20 Jul 2020 19:14:15 +0000 (21:14 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 19 Sep 2020 18:26:50 +0000 (20:26 +0200)
commit4cc43d30c387fda30e34b7075670dfb28e868acb
tree890132fdef71644b2da68aefaa69fd7bb17de70b
parentea45d6e61a8562fa8094499d2b052ba2e3ce8f6b
avformat/rmdec: Actually return value < 0 on read_header failure

The RealMedia demuxer's read_header function initially initializes ret,
the variable designated for the return variable to -1. Afterwards, chunks
of the file are parsed in a loop until an error happens or until the actual
frame data is encountered. If the first function whose return
value is put into ret doesn't fail, then ret contains a value >= 0
(actually == 0) and this is what will be returned if an error is
encountered afterwards.

This is a regression since 35bbc1955a58ba74552c50d9161084644f00bbd3.
Before that, ret had never been overwritten with a nonnegative value.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/rmdec.c