Message ID | 20190701072700.74944-1-lq@chinaffmpeg.org |
---|---|
State | New |
Headers | show |
Steven Liu (12019-07-01): > Signed-off-by: Steven Liu <lq@chinaffmpeg.org> > --- > libavformat/http.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Any reason to leave the nummeric code at all? Regards,
> 在 2019年7月1日,下午3:47,Nicolas George <george@nsup.org> 写道: > > Steven Liu (12019-07-01): >> Signed-off-by: Steven Liu <lq@chinaffmpeg.org> >> --- >> libavformat/http.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > Any reason to leave the nummeric code at all? Just leave the old numeric code to some people like it. I think the better to remove it, but i cannot sure if that is useful to other people :D. Thanks Steven
Liu Steven (12019-07-01): > Just leave the old numeric code to some people like it. I think the > better to remove it, but i cannot sure if that is useful to other > people :D. Many places only print the error message. I see no difference specific to this specific place. Regards,
> 在 2019年7月1日,下午4:49,Nicolas George <george@nsup.org> 写道: > > Liu Steven (12019-07-01): >> Just leave the old numeric code to some people like it. I think the >> better to remove it, but i cannot sure if that is useful to other >> people :D. > > Many places only print the error message. I see no difference specific > to this specific place. Agreed, but string is looks easier to understand than numeric code. For example: When i debug the code: it give me message: [http @ 0x7ff64540c200] URL read error: -541478725 after patch: [http @ 0x7ff64540c200] URL read error: End of file I think the message after patch is easier to understand :D Thanks Steven.
Liu Steven (12019-07-01): > For example: > When i debug the code: it give me message: > > [http @ 0x7ff64540c200] URL read error: -541478725 > after patch: > [http @ 0x7ff64540c200] URL read error: End of file > > I think the message after patch is easier to understand :D I do not understand what you are saying now. With your patch, I think the message would appear: [http @ 0x7ff64540c200] URL read error: (-541478725)End of file And I do not think the -541478725 brings any good. Regards,
> 在 2019年7月1日,下午4:49,Nicolas George <george@nsup.org> 写道: > > Liu Steven (12019-07-01): >> Just leave the old numeric code to some people like it. I think the >> better to remove it, but i cannot sure if that is useful to other >> people :D. > > Many places only print the error message. I see no difference specific > to this specific place. Patch update: https://patchwork.ffmpeg.org/patch/13787/ > > Regards, > > -- > Nicolas George
diff --git a/libavformat/http.c b/libavformat/http.c index 5a937994cf..1ee4d5189c 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: %d(%s)\n", read_ret, av_err2str(read_ret)); ret = read_ret; } }
Signed-off-by: Steven Liu <lq@chinaffmpeg.org> --- libavformat/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)