| 2164 | } |
| 2165 | |
| 2166 | int ff_frame_new_side_data_from_buf_ext(const AVCodecContext *avctx, |
| 2167 | AVFrameSideData ***sd, int *nb_sd, |
| 2168 | enum AVFrameSideDataType type, |
| 2169 | AVBufferRef **buf) |
| 2170 | { |
| 2171 | int ret = 0; |
| 2172 | |
| 2173 | if (side_data_pref(avctx, sd, nb_sd, type)) |
| 2174 | goto finish; |
| 2175 | |
| 2176 | if (!av_frame_side_data_add(sd, nb_sd, type, buf, 0)) |
| 2177 | ret = AVERROR(ENOMEM); |
| 2178 | |
| 2179 | finish: |
| 2180 | av_buffer_unref(buf); |
| 2181 | |
| 2182 | return ret; |
| 2183 | } |
| 2184 | |
| 2185 | int ff_frame_new_side_data_from_buf(const AVCodecContext *avctx, |
| 2186 | AVFrame *frame, enum AVFrameSideDataType type, |
no test coverage detected