[FFmpeg-cvslog] lavfi: use av_default_item_name() as filter private context logger

Stefano Sabatini git at videolan.org
Mon Jun 4 02:41:17 CEST 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Mon Jun  4 02:31:49 2012 +0200| [0f0f3bd1e022639eb8e9c02b7b18f37071c21763] | committer: Stefano Sabatini

lavfi: use av_default_item_name() as filter private context logger

avfilter_default_filter_name() is supposed to access an AVFilterContext
struct, if used with a private struct it will cause a crash since it will
access fields which are non defined in the private struct.

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

 libavfilter/af_aformat.c       |    2 +-
 libavfilter/af_amix.c          |    2 +-
 libavfilter/af_asyncts.c       |    2 +-
 libavfilter/af_silencedetect.c |    2 +-
 libavfilter/asrc_aevalsrc.c    |    2 +-
 libavfilter/asrc_anullsrc.c    |    2 +-
 libavfilter/avfiltergraph.c    |    2 +-
 libavfilter/buffersrc.c        |    2 +-
 libavfilter/vf_ass.c           |    2 +-
 libavfilter/vf_blackdetect.c   |    2 +-
 libavfilter/vf_delogo.c        |    2 +-
 libavfilter/vf_drawtext.c      |    2 +-
 libavfilter/vf_fade.c          |    2 +-
 libavfilter/vf_fps.c           |    2 +-
 libavfilter/vf_lut.c           |    2 +-
 libavfilter/vf_overlay.c       |    2 +-
 libavfilter/vsrc_cellauto.c    |    2 +-
 libavfilter/vsrc_life.c        |    2 +-
 libavfilter/vsrc_mandelbrot.c  |    2 +-
 libavfilter/vsrc_mptestsrc.c   |    2 +-
 20 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c
index 1fcaee7..35e7db8 100644
--- a/libavfilter/af_aformat.c
+++ b/libavfilter/af_aformat.c
@@ -55,7 +55,7 @@ static const AVOption options[] = {
 
 static const AVClass aformat_class = {
     .class_name = "aformat filter",
-    .item_name  = avfilter_default_filter_name,
+    .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
     .category = AV_CLASS_CATEGORY_FILTER,
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index 03e643a..d4af9a4 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -186,7 +186,7 @@ static const AVOption options[] = {
 
 static const AVClass amix_class = {
     .class_name = "amix filter",
-    .item_name  = avfilter_default_filter_name,
+    .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
 };
diff --git a/libavfilter/af_asyncts.c b/libavfilter/af_asyncts.c
index 1d97f1a..adb5347 100644
--- a/libavfilter/af_asyncts.c
+++ b/libavfilter/af_asyncts.c
@@ -50,7 +50,7 @@ static const AVOption options[] = {
 
 static const AVClass async_class = {
     .class_name = "asyncts filter",
-    .item_name  = avfilter_default_filter_name,
+    .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
 };
diff --git a/libavfilter/af_silencedetect.c b/libavfilter/af_silencedetect.c
index b8057e4..27191cd 100644
--- a/libavfilter/af_silencedetect.c
+++ b/libavfilter/af_silencedetect.c
@@ -50,7 +50,7 @@ static const AVOption silencedetect_options[] = {
 
 static const AVClass silencedetect_class = {
     .class_name = "SilenceDetectContext",
-    .item_name  = avfilter_default_filter_name,
+    .item_name  = av_default_item_name,
     .option     = silencedetect_options,
 };
 
diff --git a/libavfilter/asrc_aevalsrc.c b/libavfilter/asrc_aevalsrc.c
index b336b57..59e5503 100644
--- a/libavfilter/asrc_aevalsrc.c
+++ b/libavfilter/asrc_aevalsrc.c
@@ -80,7 +80,7 @@ static const AVOption eval_options[]= {
 
 static const AVClass eval_class = {
     "AEvalSrcContext",
-    avfilter_default_filter_name,
+    av_default_item_name,
     eval_options
 };
 
diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c
index 6cd49e6..73932bd 100644
--- a/libavfilter/asrc_anullsrc.c
+++ b/libavfilter/asrc_anullsrc.c
@@ -55,7 +55,7 @@ static const AVOption anullsrc_options[]= {
 
 static const AVClass anullsrc_class = {
     "ANullSrcContext",
-    avfilter_default_filter_name,
+    av_default_item_name,
     anullsrc_options
 };
 
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 3918a0f..8d2312e 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -36,7 +36,7 @@
 
 static const AVClass filtergraph_class = {
     .class_name = "AVFilterGraph",
-    .item_name  = avfilter_default_filter_name,
+    .item_name  = av_default_item_name,
     .version    = LIBAVUTIL_VERSION_INT,
 };
 
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index 6536542..0c60caf 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -255,7 +255,7 @@ static const AVOption audio_options[] = {
 
 static const AVClass abuffer_class = {
     .class_name = "abuffer source",
-    .item_name  = avfilter_default_filter_name,
+    .item_name  = av_default_item_name,
     .option     = audio_options,
     .version    = LIBAVUTIL_VERSION_INT,
     .category   = AV_CLASS_CATEGORY_FILTER,
diff --git a/libavfilter/vf_ass.c b/libavfilter/vf_ass.c
index 3503b26..d0e2049 100644
--- a/libavfilter/vf_ass.c
+++ b/libavfilter/vf_ass.c
@@ -56,7 +56,7 @@ static const AVOption ass_options[] = {
 
 static const AVClass ass_class = {
     "AssContext",
-    avfilter_default_filter_name,
+    av_default_item_name,
     ass_options
 };
 
diff --git a/libavfilter/vf_blackdetect.c b/libavfilter/vf_blackdetect.c
index 909cb37..a53927b 100644
--- a/libavfilter/vf_blackdetect.c
+++ b/libavfilter/vf_blackdetect.c
@@ -59,7 +59,7 @@ static const AVOption blackdetect_options[] = {
 
 static const AVClass blackdetect_class = {
     .class_name = "BlackDetectContext",
-    .item_name  = avfilter_default_filter_name,
+    .item_name  = av_default_item_name,
     .option     = blackdetect_options,
 };
 
diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c
index e0dc9a2..a9ba442 100644
--- a/libavfilter/vf_delogo.c
+++ b/libavfilter/vf_delogo.c
@@ -151,7 +151,7 @@ static const AVOption delogo_options[]= {
 
 static const AVClass delogo_class = {
     .class_name = "DelogoContext",
-    .item_name  = avfilter_default_filter_name,
+    .item_name  = av_default_item_name,
     .option     = delogo_options,
 };
 
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index c51341b..18fd7d8 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -207,7 +207,7 @@ static const AVOption drawtext_options[]= {
 
 static const AVClass drawtext_class = {
     "DrawTextContext",
-    avfilter_default_filter_name,
+    av_default_item_name,
     drawtext_options
 };
 
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index 6c795b0..d4303d0 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -71,7 +71,7 @@ static const AVOption fade_options[] = {
 
 static const AVClass fade_class = {
     "FadeContext",
-    avfilter_default_filter_name,
+    av_default_item_name,
     fade_options
 };
 
diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
index cd66e3f..d12070c 100644
--- a/libavfilter/vf_fps.c
+++ b/libavfilter/vf_fps.c
@@ -60,7 +60,7 @@ static const AVOption options[] = {
 
 static const AVClass class = {
     .class_name = "FPS filter",
-    .item_name  = avfilter_default_filter_name,
+    .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
 };
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 831a8bf..ba8a85a 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -91,7 +91,7 @@ static const AVOption lut_options[] = {
 
 static const AVClass lut_class = {
     "LutContext",
-    avfilter_default_filter_name,
+    av_default_item_name,
     lut_options
 };
 
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 8217f6d..97a3e08 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -103,7 +103,7 @@ static const AVOption overlay_options[] = {
 
 static const AVClass overlay_class = {
     "OverlayContext",
-    avfilter_default_filter_name,
+    av_default_item_name,
     overlay_options
 };
 
diff --git a/libavfilter/vsrc_cellauto.c b/libavfilter/vsrc_cellauto.c
index 93bdded..1f6ba6a 100644
--- a/libavfilter/vsrc_cellauto.c
+++ b/libavfilter/vsrc_cellauto.c
@@ -78,7 +78,7 @@ static const AVOption cellauto_options[] = {
 
 static const AVClass cellauto_class = {
     "CellAutoContext",
-    avfilter_default_filter_name,
+    av_default_item_name,
     cellauto_options
 };
 
diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c
index 9b6305d..4846f5d 100644
--- a/libavfilter/vsrc_life.c
+++ b/libavfilter/vsrc_life.c
@@ -97,7 +97,7 @@ static const AVOption life_options[] = {
 
 static const AVClass life_class = {
     "LifeContext",
-    avfilter_default_filter_name,
+    av_default_item_name,
     life_options
 };
 
diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c
index 92b4b38..2ecb03d 100644
--- a/libavfilter/vsrc_mandelbrot.c
+++ b/libavfilter/vsrc_mandelbrot.c
@@ -105,7 +105,7 @@ static const AVOption mandelbrot_options[] = {
 
 static const AVClass mandelbrot_class = {
     "MBContext",
-    avfilter_default_filter_name,
+    av_default_item_name,
     mandelbrot_options
 };
 
diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c
index c7521df..98c7988 100644
--- a/libavfilter/vsrc_mptestsrc.c
+++ b/libavfilter/vsrc_mptestsrc.c
@@ -84,7 +84,7 @@ static const AVOption mptestsrc_options[]= {
 
 static const AVClass mptestsrc_class = {
     "MPTestContext",
-    avfilter_default_filter_name,
+    av_default_item_name,
     mptestsrc_options
 };
 



More information about the ffmpeg-cvslog mailing list