[FFmpeg-devel] [PATCH 2/2] avfilter/vf_tpad: Mark unreachable code by av_assert()

Michael Niedermayer michael at niedermayer.cc
Tue May 24 03:06:15 EEST 2022


Helps: CID1440835

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavfilter/vf_tpad.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c
index c870478158..1a41c3f1a7 100644
--- a/libavfilter/vf_tpad.c
+++ b/libavfilter/vf_tpad.c
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/avassert.h"
 #include "libavutil/channel_layout.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
@@ -159,7 +160,8 @@ static int activate(AVFilterContext *ctx)
             frame = av_frame_clone(s->cache_stop);
             if (!frame)
                 return AVERROR(ENOMEM);
-        }
+        } else
+            av_assert1(0);
         frame->pts = s->pts;
         s->pts += av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base);
         if (s->pad_stop > 0)
-- 
2.17.1



More information about the ffmpeg-devel mailing list