Fixes ticket #10509.
Unified · Split
| @@ -30882,6 +30882,12 @@ missing. · 30881 unmodified lines | |||
| 30882 | That basically means that an input frame is selected if its pts is within the | 30882 | That basically means that an input frame is selected if its pts is within the |
| 30883 | interval set by the concat demuxer. | 30883 | interval set by the concat demuxer. |
| 30884 | 30884 | ||
| 30885 | @item iw @emph{(video only)} | ||
| 30886 | Represents the width of the input video frame. | ||
| 30887 | |||
| 30888 | @item ih @emph{(video only)} | ||
| 30889 | Represents the height of the input video frame. | ||
| 30890 | |||
| 30885 | @end table | 30891 | @end table |
| 30886 | 30892 | ||
| 30887 | The default value of the select expression is "1". | 30893 | The default value of the select expression is "1". |
| @@ -90,6 +90,9 @@ static const char *const var_names[] = { · 89 unmodified lines | |||
| 90 | 90 | ||
| 91 | "concatdec_select", ///< frame is within the interval set by the concat demuxer | 91 | "concatdec_select", ///< frame is within the interval set by the concat demuxer |
| 92 | 92 | ||
| 93 | "ih", ///< ih: Represents the height of the input video frame. | ||
| 94 | "iw", ///< iw: Represents the width of the input video frame. | ||
| 95 | |||
| 93 | NULL | 96 | NULL |
| 94 | }; | 97 | }; |
| 95 | 98 | ||
| @@ -144,6 +147,9 @@ enum var_name { · 48 unmodified lines | |||
| 144 | 147 | ||
| 145 | VAR_CONCATDEC_SELECT, | 148 | VAR_CONCATDEC_SELECT, |
| 146 | 149 | ||
| 150 | VAR_IH, | ||
| 151 | VAR_IW, | ||
| 152 | |||
| 147 | VAR_VARS_NB | 153 | VAR_VARS_NB |
| 148 | }; | 154 | }; |
| 149 | 155 | ||
| @@ -264,6 +270,9 @@ static int config_input(AVFilterLink *inlink) · 114 unmodified lines | |||
| 264 | select->var_values[VAR_CONSUMED_SAMPLES_N] = NAN; | 270 | select->var_values[VAR_CONSUMED_SAMPLES_N] = NAN; |
| 265 | select->var_values[VAR_SAMPLES_N] = NAN; | 271 | select->var_values[VAR_SAMPLES_N] = NAN; |
| 266 | 272 | ||
| 273 | select->var_values[VAR_IH] = NAN; | ||
| 274 | select->var_values[VAR_IW] = NAN; | ||
| 275 | |||
| 267 | select->var_values[VAR_SAMPLE_RATE] = | 276 | select->var_values[VAR_SAMPLE_RATE] = |
| 268 | inlink->type == AVMEDIA_TYPE_AUDIO ? inlink->sample_rate : NAN; | 277 | inlink->type == AVMEDIA_TYPE_AUDIO ? inlink->sample_rate : NAN; |
| 269 | 278 | ||
| @@ -357,6 +366,9 @@ FF_ENABLE_DEPRECATION_WARNINGS · 87 unmodified lines | |||
| 357 | break; | 366 | break; |
| 358 | 367 | ||
| 359 | case AVMEDIA_TYPE_VIDEO: | 368 | case AVMEDIA_TYPE_VIDEO: |
| 369 | select->var_values[VAR_IH] = frame->height; | ||
| 370 | select->var_values[VAR_IW] = frame->width; | ||
| 371 | |||
| 360 | select->var_values[VAR_INTERLACE_TYPE] = | 372 | select->var_values[VAR_INTERLACE_TYPE] = |
| 361 | !(frame->flags & AV_FRAME_FLAG_INTERLACED) ? INTERLACE_TYPE_P : | 373 | !(frame->flags & AV_FRAME_FLAG_INTERLACED) ? INTERLACE_TYPE_P : |
| 362 | (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? INTERLACE_TYPE_T : INTERLACE_TYPE_B; | 374 | (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? INTERLACE_TYPE_T : INTERLACE_TYPE_B; |