diff mbox

[FFmpeg-devel,3/3] hls: don't print a certain warning if playlist loading is aborted

Message ID 20180124070823.17373-3-nfxjfg@googlemail.com
State Accepted
Commit 23ffeb91fe46f6f95348731396ccfdb7fbff0337
Headers show

Commit Message

wm4 Jan. 24, 2018, 7:08 a.m. UTC
AVERROR_EXIT happens when the user's interrupt callback signals that
playback should be aborted. In this case, the demuxer shouldn't print a
warning, as it's expected that all network accesses are stopped.
---
 libavformat/hls.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Liu Steven Jan. 26, 2018, 3:11 a.m. UTC | #1
> On 24 Jan 2018, at 15:08, wm4 <nfxjfg@googlemail.com> wrote:
> 
> AVERROR_EXIT happens when the user's interrupt callback signals that
> playback should be aborted. In this case, the demuxer shouldn't print a
> warning, as it's expected that all network accesses are stopped.
> ---
> libavformat/hls.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/hls.c b/libavformat/hls.c
> index 6e1a2e3f1e..02e764f932 100644
> --- a/libavformat/hls.c
> +++ b/libavformat/hls.c
> @@ -1422,8 +1422,9 @@ reload:
>         if (!v->finished &&
>             av_gettime_relative() - v->last_load_time >= reload_interval) {
>             if ((ret = parse_playlist(c, v->url, v, NULL)) < 0) {
> -                av_log(v->parent, AV_LOG_WARNING, "Failed to reload playlist %d\n",
> -                       v->index);
> +                if (ret != AVERROR_EXIT)
> +                    av_log(v->parent, AV_LOG_WARNING, "Failed to reload playlist %d\n",
> +                           v->index);
>                 return ret;
>             }
>             /* If we need to reload the playlist again below (if
> -- 
> 2.15.1
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Patchset LGTM


Thanks
Steven
wm4 Jan. 27, 2018, 3:19 a.m. UTC | #2
On Fri, 26 Jan 2018 11:11:46 +0800
刘歧 <lq@chinaffmpeg.org> wrote:

> > On 24 Jan 2018, at 15:08, wm4 <nfxjfg@googlemail.com> wrote:
> > 
> > AVERROR_EXIT happens when the user's interrupt callback signals that
> > playback should be aborted. In this case, the demuxer shouldn't print a
> > warning, as it's expected that all network accesses are stopped.
> > ---
> > libavformat/hls.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libavformat/hls.c b/libavformat/hls.c
> > index 6e1a2e3f1e..02e764f932 100644
> > --- a/libavformat/hls.c
> > +++ b/libavformat/hls.c
> > @@ -1422,8 +1422,9 @@ reload:
> >         if (!v->finished &&
> >             av_gettime_relative() - v->last_load_time >= reload_interval) {
> >             if ((ret = parse_playlist(c, v->url, v, NULL)) < 0) {
> > -                av_log(v->parent, AV_LOG_WARNING, "Failed to reload playlist %d\n",
> > -                       v->index);
> > +                if (ret != AVERROR_EXIT)
> > +                    av_log(v->parent, AV_LOG_WARNING, "Failed to reload playlist %d\n",
> > +                           v->index);
> >                 return ret;
> >             }
> >             /* If we need to reload the playlist again below (if
> > -- 
> > 2.15.1
> > 
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel  
> 
> Patchset LGTM

Thanks. Pushed all 3 patches.
diff mbox

Patch

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 6e1a2e3f1e..02e764f932 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -1422,8 +1422,9 @@  reload:
         if (!v->finished &&
             av_gettime_relative() - v->last_load_time >= reload_interval) {
             if ((ret = parse_playlist(c, v->url, v, NULL)) < 0) {
-                av_log(v->parent, AV_LOG_WARNING, "Failed to reload playlist %d\n",
-                       v->index);
+                if (ret != AVERROR_EXIT)
+                    av_log(v->parent, AV_LOG_WARNING, "Failed to reload playlist %d\n",
+                           v->index);
                 return ret;
             }
             /* If we need to reload the playlist again below (if