| 1360 | } |
| 1361 | |
| 1362 | static int get_buffer(AVCodecContext *dec_ctx, AVFrame *frame, int flags) |
| 1363 | { |
| 1364 | DecoderPriv *dp = dec_ctx->opaque; |
| 1365 | |
| 1366 | // for multiview video, store the output mask in frame opaque |
| 1367 | if (dp->nb_view_map) { |
| 1368 | const AVFrameSideData *sd = av_frame_get_side_data(frame, AV_FRAME_DATA_VIEW_ID); |
| 1369 | int view_id = sd ? *(int*)sd->data : 0; |
| 1370 | |
| 1371 | for (int i = 0; i < dp->nb_view_map; i++) { |
| 1372 | if (dp->view_map[i].id == view_id) { |
| 1373 | frame->opaque = (void*)dp->view_map[i].out_mask; |
| 1374 | break; |
| 1375 | } |
| 1376 | } |
| 1377 | } |
| 1378 | |
| 1379 | return avcodec_default_get_buffer2(dec_ctx, frame, flags); |
| 1380 | } |
| 1381 | |
| 1382 | static HWDevice *hw_device_match_by_codec(const AVCodec *codec) |
| 1383 | { |
nothing calls this directly
no test coverage detected