| 2145 | |
| 2146 | |
| 2147 | int ff_frame_new_side_data(const AVCodecContext *avctx, AVFrame *frame, |
| 2148 | enum AVFrameSideDataType type, size_t size, |
| 2149 | AVFrameSideData **psd) |
| 2150 | { |
| 2151 | AVFrameSideData *sd; |
| 2152 | |
| 2153 | if (side_data_pref(avctx, &frame->side_data, &frame->nb_side_data, type)) { |
| 2154 | if (psd) |
| 2155 | *psd = NULL; |
| 2156 | return 0; |
| 2157 | } |
| 2158 | |
| 2159 | sd = av_frame_new_side_data(frame, type, size); |
| 2160 | if (psd) |
| 2161 | *psd = sd; |
| 2162 | |
| 2163 | return sd ? 0 : AVERROR(ENOMEM); |
| 2164 | } |
| 2165 | |
| 2166 | int ff_frame_new_side_data_from_buf_ext(const AVCodecContext *avctx, |
| 2167 | AVFrameSideData ***sd, int *nb_sd, |
no test coverage detected