[FFmpeg-devel] [PATCH] lavfi/select: unbreak compatibility with older PICT_TYPE syntax

Paul B Mahol onemda at gmail.com
Fri May 10 20:35:31 CEST 2013


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavfilter/f_select.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c
index 5237fc3..07a64f3 100644
--- a/libavfilter/f_select.c
+++ b/libavfilter/f_select.c
@@ -59,6 +59,13 @@ static const char *const var_names[] = {
     "SI",
     "SP",
     "BI",
+    "PICT_TYPE_I",
+    "PICT_TYPE_P",
+    "PICT_TYPE_B",
+    "PICT_TYPE_S",
+    "PICT_TYPE_SI",
+    "PICT_TYPE_SP",
+    "PICT_TYPE_BI",
 
     "interlace_type",    ///< the frame interlace type
     "PROGRESSIVE",
@@ -95,6 +102,13 @@ enum var_name {
     VAR_PREV_SELECTED_T,
 
     VAR_PICT_TYPE,
+    VAR_I,
+    VAR_P,
+    VAR_B,
+    VAR_S,
+    VAR_SI,
+    VAR_SP,
+    VAR_BI,
     VAR_PICT_TYPE_I,
     VAR_PICT_TYPE_P,
     VAR_PICT_TYPE_B,
@@ -200,6 +214,12 @@ static int config_input(AVFilterLink *inlink)
     select->var_values[VAR_START_PTS]         = NAN;
     select->var_values[VAR_START_T]           = NAN;
 
+    select->var_values[VAR_I]  = AV_PICTURE_TYPE_I;
+    select->var_values[VAR_P]  = AV_PICTURE_TYPE_P;
+    select->var_values[VAR_B]  = AV_PICTURE_TYPE_B;
+    select->var_values[VAR_SI] = AV_PICTURE_TYPE_SI;
+    select->var_values[VAR_SP] = AV_PICTURE_TYPE_SP;
+    select->var_values[VAR_BI] = AV_PICTURE_TYPE_BI;
     select->var_values[VAR_PICT_TYPE_I]  = AV_PICTURE_TYPE_I;
     select->var_values[VAR_PICT_TYPE_P]  = AV_PICTURE_TYPE_P;
     select->var_values[VAR_PICT_TYPE_B]  = AV_PICTURE_TYPE_B;
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list