Fixes ticket #10509.
Showing the changes to libavfilter (1 of 2 files). Show all
Unified · Split
| @@ -90,6 +90,9 @@ static const char *const var_names[] = { · 89 unmodified lines | ||
| 90 | 90 | |
| 91 | 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 | 96 | NULL |
| 94 | 97 | }; |
| 95 | 98 | |
| @@ -144,6 +147,9 @@ enum var_name { · 48 unmodified lines | ||
| 144 | 147 | |
| 145 | 148 | VAR_CONCATDEC_SELECT, |
| 146 | 149 | |
| 150 | + VAR_IH, | |
| 151 | + VAR_IW, | |
| 152 | + | |
| 147 | 153 | VAR_VARS_NB |
| 148 | 154 | }; |
| 149 | 155 | |
| @@ -264,6 +270,9 @@ static int config_input(AVFilterLink *inlink) · 114 unmodified lines | ||
| 264 | 270 | select->var_values[VAR_CONSUMED_SAMPLES_N] = NAN; |
| 265 | 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 | 276 | select->var_values[VAR_SAMPLE_RATE] = |
| 268 | 277 | inlink->type == AVMEDIA_TYPE_AUDIO ? inlink->sample_rate : NAN; |
| 269 | 278 | |
| @@ -357,6 +366,9 @@ FF_ENABLE_DEPRECATION_WARNINGS · 87 unmodified lines | ||
| 357 | 366 | break; |
| 358 | 367 | |
| 359 | 368 | case AVMEDIA_TYPE_VIDEO: |
| 369 | + select->var_values[VAR_IH] = frame->height; | |
| 370 | + select->var_values[VAR_IW] = frame->width; | |
| 371 | + | |
| 360 | 372 | select->var_values[VAR_INTERLACE_TYPE] = |
| 361 | 373 | !(frame->flags & AV_FRAME_FLAG_INTERLACED) ? INTERLACE_TYPE_P : |
| 362 | 374 | (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? INTERLACE_TYPE_T : INTERLACE_TYPE_B; |