[FFmpeg-devel] [PATCH] ffmpeg: remove useless NULL-check on avfilter_unref_buffer

Stefano Sabatini stefano.sabatini-lala at poste.it
Fri May 20 01:02:11 CEST 2011


Simplify. The check is no more required since recent changes in the
function, the check is done in the function.
---
 ffmpeg.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 2b19c7f..fb644ad 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1785,8 +1785,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
                     cont:
                     frame_available = (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) &&
                                        ost->output_video_filter && avfilter_poll_frame(ost->output_video_filter->inputs[0]);
-                    if (ost->picref)
-                        avfilter_unref_buffer(ost->picref);
+                    avfilter_unref_buffer(ost->picref);
                 }
 #endif
                 }
-- 
1.7.2.3



More information about the ffmpeg-devel mailing list