diff mbox

[FFmpeg-devel] ffmpeg: do not report EOF on filters as an error.

Message ID 20170423124653.4319-1-george@nsup.org
State Accepted
Commit 0dfb4d4b438b7203b3aaef9fc6ffebc57df140d8
Headers show

Commit Message

Nicolas George April 23, 2017, 12:46 p.m. UTC
Also print the error message in case of real error.

Signed-off-by: Nicolas George <george@nsup.org>
---
 ffmpeg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Paul B Mahol April 23, 2017, 1:13 p.m. UTC | #1
On 4/23/17, Nicolas George <george@nsup.org> wrote:
> Also print the error message in case of real error.
>
> Signed-off-by: Nicolas George <george@nsup.org>
> ---
>  ffmpeg.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 70431e8808..bf04a6c683 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -2213,7 +2213,8 @@ static int ifilter_send_frame(InputFilter *ifilter,
> AVFrame *frame)
>
>      ret = av_buffersrc_add_frame_flags(ifilter->filter, frame,
> AV_BUFFERSRC_FLAG_PUSH);
>      if (ret < 0) {
> -        av_log(NULL, AV_LOG_ERROR, "Error while filtering\n");
> +        if (ret != AVERROR_EOF)
> +            av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n",
> av_err2str(ret));
>          return ret;
>      }
>
> --
> 2.11.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

ok
Nicolas George April 23, 2017, 1:27 p.m. UTC | #2
Le quartidi 4 floréal, an CCXXV, Paul B Mahol a écrit :
> ok

Thanks, pushed.

Regards,
diff mbox

Patch

diff --git a/ffmpeg.c b/ffmpeg.c
index 70431e8808..bf04a6c683 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2213,7 +2213,8 @@  static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame)
 
     ret = av_buffersrc_add_frame_flags(ifilter->filter, frame, AV_BUFFERSRC_FLAG_PUSH);
     if (ret < 0) {
-        av_log(NULL, AV_LOG_ERROR, "Error while filtering\n");
+        if (ret != AVERROR_EOF)
+            av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n", av_err2str(ret));
         return ret;
     }