MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / side_data_pref

Function side_data_pref

libavcodec/decode.c:2131–2144  ·  view source on GitHub ↗

* Check side data preference and clear existing side data from frame * if needed. * * @retval 0 side data of this type can be added to frame * @retval 1 side data of this type should not be added to frame */

Source from the content-addressed store, hash-verified

2129 * @retval 1 side data of this type should not be added to frame
2130 */
2131static int side_data_pref(const AVCodecContext *avctx, AVFrameSideData ***sd,
2132 int *nb_sd, enum AVFrameSideDataType type)
2133{
2134 DecodeContext *dc = decode_ctx(avctx->internal);
2135
2136 // Note: could be skipped for `type` without corresponding packet sd
2137 if (av_frame_side_data_get(*sd, *nb_sd, type)) {
2138 if (dc->side_data_pref_mask & (1ULL << type))
2139 return 1;
2140 av_frame_side_data_remove(sd, nb_sd, type);
2141 }
2142
2143 return 0;
2144}
2145
2146
2147int ff_frame_new_side_data(const AVCodecContext *avctx, AVFrame *frame,

Calls 3

decode_ctxFunction · 0.85
av_frame_side_data_getFunction · 0.85

Tested by

no test coverage detected