| 410 | } |
| 411 | |
| 412 | static 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 | |
| 428 | static int receive_samples(SyncQueue *sq, SyncQueueStream *st, |
| 429 | AVFrame *dst, int nb_samples) |
no outgoing calls
no test coverage detected