[FFmpeg-cvslog] Fix segfault with -filters option

Bobby Bingham git at videolan.org
Wed Sep 19 06:46:07 CEST 2012


ffmpeg | branch: master | Bobby Bingham <uhmmmm at gmail.com> | Tue Sep 18 23:27:43 2012 -0500| [d0c6ac0debaff1ca32be71cbbf958698106c3c4f] | committer: Bobby Bingham

Fix segfault with -filters option

Filters now use null pointers to indicate having no input/output pads,
rather than empty lists of pads. We can't assume pad is non-null
anymore.

Signed-off-by: Bobby Bingham <uhmmmm at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d0c6ac0debaff1ca32be71cbbf958698106c3c4f
---

 cmdutils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmdutils.c b/cmdutils.c
index 3ed143e..bd4ba4a 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1041,7 +1041,7 @@ int show_filters(void *optctx, const char *opt, const char *arg)
                 *(descr_cur++) = '>';
             }
             pad = i ? (*filter)->outputs : (*filter)->inputs;
-            for (j = 0; pad[j].name; j++) {
+            for (j = 0; pad && pad[j].name; j++) {
                 if (descr_cur >= descr + sizeof(descr) - 4)
                     break;
                 *(descr_cur++) = get_media_type_char(pad[j].type);



More information about the ffmpeg-cvslog mailing list