diff mbox series

[FFmpeg-devel,2/2] fftools/ffmpeg: Fix indentation after change

Message ID MN2PR04MB5981A089141D44D91A4177EEBAB49@MN2PR04MB5981.namprd04.prod.outlook.com
State Superseded, archived
Headers show
Series [FFmpeg-devel,1/2] fftools/ffmpeg: Remove redundant loop | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Soft Works Oct. 10, 2021, 4:36 p.m. UTC
Signed-off-by: softworkz <softworkz@hotmail.com>
---
 fftools/ffmpeg.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

Comments

Andreas Rheinhardt Oct. 10, 2021, 4:41 p.m. UTC | #1
Soft Works:
> Signed-off-by: softworkz <softworkz@hotmail.com>
> ---
>  fftools/ffmpeg.c | 32 ++++++++++++++++----------------
>  1 file changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> index e205945e63..b47e596878 100644
> --- a/fftools/ffmpeg.c
> +++ b/fftools/ffmpeg.c
> @@ -2216,22 +2216,22 @@ static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame)
>  
>      /* (re)init the graph if possible, otherwise buffer the frame and return */
>      if (need_reinit || !fg->graph) {
> -            if (!ifilter_has_all_input_formats(fg)) {
> -                AVFrame *tmp = av_frame_clone(frame);
> -                if (!tmp)
> -                    return AVERROR(ENOMEM);
> -                av_frame_unref(frame);
> -
> -                if (!av_fifo_space(ifilter->frame_queue)) {
> -                    ret = av_fifo_realloc2(ifilter->frame_queue, 2 * av_fifo_size(ifilter->frame_queue));
> -                    if (ret < 0) {
> -                        av_frame_free(&tmp);
> -                        return ret;
> -                    }
> -                }
> -                av_fifo_generic_write(ifilter->frame_queue, &tmp, sizeof(tmp), NULL);
> -                return 0;
> -            }
> +		if (!ifilter_has_all_input_formats(fg)) {
> +			AVFrame *tmp = av_frame_clone(frame);
> +			if (!tmp)
> +				return AVERROR(ENOMEM);
> +			av_frame_unref(frame);
> +
> +			if (!av_fifo_space(ifilter->frame_queue)) {
> +				ret = av_fifo_realloc2(ifilter->frame_queue, 2 * av_fifo_size(ifilter->frame_queue));
> +				if (ret < 0) {
> +					av_frame_free(&tmp);
> +					return ret;
> +				}
> +			}
> +			av_fifo_generic_write(ifilter->frame_queue, &tmp, sizeof(tmp), NULL);
> +			return 0;
> +		}
>  
>          ret = reap_filters(1);
>          if (ret < 0 && ret != AVERROR_EOF) {
> 

Don't use tabs.

- Andreas
Soft Works Oct. 10, 2021, 5 p.m. UTC | #2
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Andreas Rheinhardt
> Sent: Sunday, October 10, 2021 6:41 PM
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH 2/2] fftools/ffmpeg: Fix
> indentation after change
> 
> Soft Works:
> > Signed-off-by: softworkz <softworkz@hotmail.com>
> > ---
> >  fftools/ffmpeg.c | 32 ++++++++++++++++----------------
> >  1 file changed, 16 insertions(+), 16 deletions(-)
> >
> > diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> > index e205945e63..b47e596878 100644
> > --- a/fftools/ffmpeg.c
> > +++ b/fftools/ffmpeg.c
> > @@ -2216,22 +2216,22 @@ static int ifilter_send_frame(InputFilter
> *ifilter, AVFrame *frame)


> Don't use tabs.
> 
> - Andreas

aaarrghh - shouldn't have used a different editor..

Thanks,
sw
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index e205945e63..b47e596878 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2216,22 +2216,22 @@  static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame)
 
     /* (re)init the graph if possible, otherwise buffer the frame and return */
     if (need_reinit || !fg->graph) {
-            if (!ifilter_has_all_input_formats(fg)) {
-                AVFrame *tmp = av_frame_clone(frame);
-                if (!tmp)
-                    return AVERROR(ENOMEM);
-                av_frame_unref(frame);
-
-                if (!av_fifo_space(ifilter->frame_queue)) {
-                    ret = av_fifo_realloc2(ifilter->frame_queue, 2 * av_fifo_size(ifilter->frame_queue));
-                    if (ret < 0) {
-                        av_frame_free(&tmp);
-                        return ret;
-                    }
-                }
-                av_fifo_generic_write(ifilter->frame_queue, &tmp, sizeof(tmp), NULL);
-                return 0;
-            }
+		if (!ifilter_has_all_input_formats(fg)) {
+			AVFrame *tmp = av_frame_clone(frame);
+			if (!tmp)
+				return AVERROR(ENOMEM);
+			av_frame_unref(frame);
+
+			if (!av_fifo_space(ifilter->frame_queue)) {
+				ret = av_fifo_realloc2(ifilter->frame_queue, 2 * av_fifo_size(ifilter->frame_queue));
+				if (ret < 0) {
+					av_frame_free(&tmp);
+					return ret;
+				}
+			}
+			av_fifo_generic_write(ifilter->frame_queue, &tmp, sizeof(tmp), NULL);
+			return 0;
+		}
 
         ret = reap_filters(1);
         if (ret < 0 && ret != AVERROR_EOF) {