aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/f_select.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-12-12 00:28:09 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-12-13 00:18:49 +0100
commit43912625e0103f79674a1f36cc4572204f94e9fc (patch)
treee0310e1edd3d0bebeebd4be07b30accb504972eb /libavfilter/f_select.c
parent6ba1f280087d32ed71332211b1d9cc1b350f7e28 (diff)
downloadffmpeg-43912625e0103f79674a1f36cc4572204f94e9fc.tar.gz
lavfi/select: assign NAN to ignored values
Also log scene value. Improve debugging.
Diffstat (limited to 'libavfilter/f_select.c')
-rw-r--r--libavfilter/f_select.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c
index 6628d6d1ea..11ee98839f 100644
--- a/libavfilter/f_select.c
+++ b/libavfilter/f_select.c
@@ -197,6 +197,12 @@ static int config_input(AVFilterLink *inlink)
select->var_values[VAR_INTERLACE_TYPE_T] = INTERLACE_TYPE_T;
select->var_values[VAR_INTERLACE_TYPE_B] = INTERLACE_TYPE_B;
+ select->var_values[VAR_PICT_TYPE] = NAN;
+ select->var_values[VAR_INTERLACE_TYPE] = NAN;
+ select->var_values[VAR_SCENE] = NAN;
+ select->var_values[VAR_CONSUMED_SAMPLES_N] = NAN;
+ select->var_values[VAR_SAMPLES_N] = NAN;
+
select->var_values[VAR_SAMPLE_RATE] =
inlink->type == AVMEDIA_TYPE_AUDIO ? inlink->sample_rate : NAN;
@@ -298,11 +304,12 @@ static int select_frame(AVFilterContext *ctx, AVFilterBufferRef *ref)
switch (inlink->type) {
case AVMEDIA_TYPE_VIDEO:
- av_log(inlink->dst, AV_LOG_DEBUG, " interlace_type:%c pict_type:%c",
+ av_log(inlink->dst, AV_LOG_DEBUG, " interlace_type:%c pict_type:%c scene:%f",
select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_P ? 'P' :
select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_T ? 'T' :
select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_B ? 'B' : '?',
- av_get_picture_type_char(select->var_values[VAR_PICT_TYPE]));
+ av_get_picture_type_char(select->var_values[VAR_PICT_TYPE]),
+ select->var_values[VAR_SCENE]);
break;
case AVMEDIA_TYPE_AUDIO:
av_log(inlink->dst, AV_LOG_DEBUG, " samples_n:%d consumed_samples_n:%d",