diff mbox

[FFmpeg-devel] avformat/http: change error message from numeric code to string

Message ID 20190701094359.76618-1-lq@chinaffmpeg.org
State Superseded
Headers show

Commit Message

Liu Steven July 1, 2019, 9:43 a.m. UTC
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/http.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Moritz Barsnick July 1, 2019, 11:03 a.m. UTC | #1
On Mon, Jul 01, 2019 at 17:43:59 +0800, Steven Liu wrote:
> -                av_log(h, AV_LOG_ERROR, "URL read error:  %d\n", read_ret);
> +                av_log(h, AV_LOG_ERROR, "URL read error:  %s\n", av_err2str(read_ret));
                                                           ^^

You could also drop one of the two spaces. I don't think they are meant
to align anything.

Moritz
Liu Steven July 1, 2019, 12:24 p.m. UTC | #2
> 在 2019年7月1日,下午7:03,Moritz Barsnick <barsnick@gmx.net> 写道:
> 
> On Mon, Jul 01, 2019 at 17:43:59 +0800, Steven Liu wrote:
>> -                av_log(h, AV_LOG_ERROR, "URL read error:  %d\n", read_ret);
>> +                av_log(h, AV_LOG_ERROR, "URL read error:  %s\n", av_err2str(read_ret));
>                                                           ^^
> 
> You could also drop one of the two spaces. I don't think they are meant
> to align anything.
patch update: https://patchwork.ffmpeg.org/patch/13790/

Thanks Moritz

Steven
diff mbox

Patch

diff --git a/libavformat/http.c b/libavformat/http.c
index 5a937994cf..f687dc3ae2 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -1638,7 +1638,7 @@  static int http_shutdown(URLContext *h, int flags)
             read_ret = ffurl_read(s->hd, buf, sizeof(buf));
             s->hd->flags &= ~AVIO_FLAG_NONBLOCK;
             if (read_ret < 0 && read_ret != AVERROR(EAGAIN)) {
-                av_log(h, AV_LOG_ERROR, "URL read error:  %d\n", read_ret);
+                av_log(h, AV_LOG_ERROR, "URL read error:  %s\n", av_err2str(read_ret));
                 ret = read_ret;
             }
         }