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

Function get_buffer

fftools/ffmpeg_dec.c:1362–1380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1360}
1361
1362static 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
1382static HWDevice *hw_device_match_by_codec(const AVCodec *codec)
1383{

Callers

nothing calls this directly

Calls 2

av_frame_get_side_dataFunction · 0.85

Tested by

no test coverage detected