[FFmpeg-cvslog] avformat/dashdec: use av_err2str
Marvin Scholz
git at videolan.org
Tue Apr 22 21:52:15 EEST 2025
ffmpeg | branch: master | Marvin Scholz <epirat07 at gmail.com> | Wed Apr 2 01:20:31 2025 +0200| [8129474b93a589e38aa4c2db05713738e9d92f68] | committer: Marvin Scholz
avformat/dashdec: use av_err2str
There is no need to explicitly specify the buffer, as it
is only ever passed to av_log, so av_err2str can be used.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8129474b93a589e38aa4c2db05713738e9d92f68
---
libavformat/dashenc.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index d4a6fe0304..af92e38bbd 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -277,10 +277,8 @@ static const char *get_extension_str(SegmentType type, int single_file)
static int handle_io_open_error(AVFormatContext *s, int err, char *url) {
DASHContext *c = s->priv_data;
- char errbuf[AV_ERROR_MAX_STRING_SIZE];
- av_strerror(err, errbuf, sizeof(errbuf));
av_log(s, c->ignore_io_errors ? AV_LOG_WARNING : AV_LOG_ERROR,
- "Unable to open %s for writing: %s\n", url, errbuf);
+ "Unable to open %s for writing: %s\n", url, av_err2str(err));
return c->ignore_io_errors ? 0 : err;
}
@@ -1865,9 +1863,8 @@ static void dashenc_delete_file(AVFormatContext *s, char *filename) {
} else {
int res = ffurl_delete(filename);
if (res < 0) {
- char errbuf[AV_ERROR_MAX_STRING_SIZE];
- av_strerror(res, errbuf, sizeof(errbuf));
- av_log(s, (res == AVERROR(ENOENT) ? AV_LOG_WARNING : AV_LOG_ERROR), "failed to delete %s: %s\n", filename, errbuf);
+ av_log(s, (res == AVERROR(ENOENT) ? AV_LOG_WARNING : AV_LOG_ERROR),
+ "failed to delete %s: %s\n", filename, av_err2str(res));
}
}
}
More information about the ffmpeg-cvslog
mailing list