mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/mlvdec: Simplify code by using avio_closep()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
07e4ed5637
commit
edeaf6f3a4
|
@ -342,16 +342,14 @@ static int read_header(AVFormatContext *avctx)
|
||||||
break;
|
break;
|
||||||
if (check_file_header(mlv->pb[i], guid) < 0) {
|
if (check_file_header(mlv->pb[i], guid) < 0) {
|
||||||
av_log(avctx, AV_LOG_WARNING, "ignoring %s; bad format or guid mismatch\n", filename);
|
av_log(avctx, AV_LOG_WARNING, "ignoring %s; bad format or guid mismatch\n", filename);
|
||||||
avio_close(mlv->pb[i]);
|
avio_closep(&mlv->pb[i]);
|
||||||
mlv->pb[i] = NULL;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
av_log(avctx, AV_LOG_INFO, "scanning %s\n", filename);
|
av_log(avctx, AV_LOG_INFO, "scanning %s\n", filename);
|
||||||
ret = scan_file(avctx, vst, ast, i);
|
ret = scan_file(avctx, vst, ast, i);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_log(avctx, AV_LOG_WARNING, "ignoring %s; %s\n", filename, av_err2str(ret));
|
av_log(avctx, AV_LOG_WARNING, "ignoring %s; %s\n", filename, av_err2str(ret));
|
||||||
avio_close(mlv->pb[i]);
|
avio_closep(&mlv->pb[i]);
|
||||||
mlv->pb[i] = NULL;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue