mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/flacdec: Avoid double AVERRORS
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 029294ff54
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f2d836819d
commit
ef879f02f2
|
@ -78,7 +78,7 @@ static int flac_read_header(AVFormatContext *s)
|
||||||
/* process metadata blocks */
|
/* process metadata blocks */
|
||||||
while (!avio_feof(s->pb) && !metadata_last) {
|
while (!avio_feof(s->pb) && !metadata_last) {
|
||||||
if (avio_read(s->pb, header, 4) != 4)
|
if (avio_read(s->pb, header, 4) != 4)
|
||||||
return AVERROR(AVERROR_INVALIDDATA);
|
return AVERROR_INVALIDDATA;
|
||||||
flac_parse_block_header(header, &metadata_last, &metadata_type,
|
flac_parse_block_header(header, &metadata_last, &metadata_type,
|
||||||
&metadata_size);
|
&metadata_size);
|
||||||
switch (metadata_type) {
|
switch (metadata_type) {
|
||||||
|
|
Loading…
Reference in New Issue