This will be used to propagate global side data through the filterchain.
Unified · Split
| @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07 · 1 unmodified line | |||
| 2 | 2 | ||
| 3 | API changes, most recent first: | 3 | API changes, most recent first: |
| 4 | 4 | ||
| 5 | 2025-01-25 - xxxxxxxxxx - lavfi 10.7.100 - avfilter.h | ||
| 6 | Add AVFilterLink.side_data and AVFilterLink.nb_side_data | ||
| 7 | |||
| 5 | 2025-01-05 - xxxxxxxxxx - lavc 59.55.100 - frame.h | 8 | 2025-01-05 - xxxxxxxxxx - lavc 59.55.100 - frame.h |
| 6 | Add AV_FRAME_SIDE_DATA_FLAG_NEW_REF. | 9 | Add AV_FRAME_SIDE_DATA_FLAG_NEW_REF. |
| 7 | 10 | ||
| @@ -206,6 +206,7 @@ static void link_free(AVFilterLink **link) · 205 unmodified lines | |||
| 206 | ff_framequeue_free(&li->fifo); | 206 | ff_framequeue_free(&li->fifo); |
| 207 | ff_frame_pool_uninit(&li->frame_pool); | 207 | ff_frame_pool_uninit(&li->frame_pool); |
| 208 | av_channel_layout_uninit(&(*link)->ch_layout); | 208 | av_channel_layout_uninit(&(*link)->ch_layout); |
| 209 | av_frame_side_data_free(&(*link)->side_data, &(*link)->nb_side_data); | ||
| 209 | 210 | ||
| 210 | av_buffer_unref(&li->l.hw_frames_ctx); | 211 | av_buffer_unref(&li->l.hw_frames_ctx); |
| 211 | 212 | ||
| @@ -376,7 +377,22 @@ int ff_filter_config_links(AVFilterContext *filter) · 164 unmodified lines | |||
| 376 | "callbacks on all outputs\n"); | 377 | "callbacks on all outputs\n"); |
| 377 | return AVERROR(EINVAL); | 378 | return AVERROR(EINVAL); |
| 378 | } | 379 | } |
| 379 | } else if ((ret = config_link(link)) < 0) { | 380 | } |
| 381 | |||
| 382 | /* Copy side data before link->srcpad->config_props() is called, so the filter | ||
| 383 | * may remove it for the next filter in the chain */ | ||
| 384 | if (inlink && inlink->nb_side_data && !link->nb_side_data) { | ||
| 385 | for (i = 0; i < inlink->nb_side_data; i++) { | ||
| 386 | ret = av_frame_side_data_clone(&link->side_data, &link->nb_side_data, | ||
| 387 | inlink->side_data[i], 0); | ||
| 388 | if (ret < 0) { | ||
| 389 | av_frame_side_data_free(&link->side_data, &link->nb_side_data); | ||
| 390 | return ret; | ||
| 391 | } | ||
| 392 | } | ||
| 393 | } | ||
| 394 | |||
| 395 | if (config_link && (ret = config_link(link)) < 0) { | ||
| 380 | av_log(link->src, AV_LOG_ERROR, | 396 | av_log(link->src, AV_LOG_ERROR, |
| 381 | "Failed to configure output pad on %s\n", | 397 | "Failed to configure output pad on %s\n", |
| 382 | link->src->name); | 398 | link->src->name); |
| @@ -413,6 +413,9 @@ struct AVFilterLink { · 412 unmodified lines | |||
| 413 | */ | 413 | */ |
| 414 | AVRational time_base; | 414 | AVRational time_base; |
| 415 | 415 | ||
| 416 | AVFrameSideData **side_data; | ||
| 417 | int nb_side_data; | ||
| 418 | |||
| 416 | /***************************************************************** | 419 | /***************************************************************** |
| 417 | * All fields below this line are not part of the public API. They | 420 | * All fields below this line are not part of the public API. They |
| 418 | * may not be used outside of libavfilter and can be changed and | 421 | * may not be used outside of libavfilter and can be changed and |
| @@ -31,8 +31,8 @@ · 30 unmodified lines | |||
| 31 | 31 | ||
| 32 | #include "version_major.h" | 32 | #include "version_major.h" |
| 33 | 33 | ||
| 34 | #define LIBAVFILTER_VERSION_MINOR 6 | 34 | #define LIBAVFILTER_VERSION_MINOR 7 |
| 35 | #define LIBAVFILTER_VERSION_MICRO 101 | 35 | #define LIBAVFILTER_VERSION_MICRO 100 |
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ | 38 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ |