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

Function frame_is_aligned

fftools/sync_queue.c:412–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410}
411
412static int frame_is_aligned(const SyncQueue *sq, const AVFrame *frame)
413{
414 // only checks linesize[0], so only works for audio
415 av_assert0(frame->nb_samples > 0);
416 av_assert0(sq->align_mask);
417
418 // only check data[0], because we always offset all data pointers
419 // by the same offset, so if one is aligned, all are
420 if (!((uintptr_t)frame->data[0] & sq->align_mask) &&
421 !(frame->linesize[0] & sq->align_mask) &&
422 frame->linesize[0] > sq->align_mask)
423 return 1;
424
425 return 0;
426}
427
428static int receive_samples(SyncQueue *sq, SyncQueueStream *st,
429 AVFrame *dst, int nb_samples)

Callers 2

receive_samplesFunction · 0.85
receive_for_streamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected