| 221 | } |
| 222 | |
| 223 | static int amf_frames_init(AVHWFramesContext *ctx) |
| 224 | { |
| 225 | int i; |
| 226 | |
| 227 | for (i = 0; i < FF_ARRAY_ELEMS(supported_formats); i++) { |
| 228 | if (ctx->sw_format == supported_formats[i]) |
| 229 | break; |
| 230 | } |
| 231 | if (i == FF_ARRAY_ELEMS(supported_formats)) { |
| 232 | av_log(ctx, AV_LOG_ERROR, "Pixel format '%s' is not supported\n", |
| 233 | av_get_pix_fmt_name(ctx->sw_format)); |
| 234 | return AVERROR(ENOSYS); |
| 235 | } |
| 236 | |
| 237 | ffhwframesctx(ctx)->pool_internal = |
| 238 | av_buffer_pool_init2(sizeof(AMFSurface), ctx, |
| 239 | &amf_pool_alloc, NULL); |
| 240 | |
| 241 | return 0; |
| 242 | } |
| 243 | |
| 244 | |
| 245 | static int amf_get_buffer(AVHWFramesContext *ctx, AVFrame *frame) |
nothing calls this directly
no test coverage detected