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

Function receive_internal

fftools/sync_queue.c:562–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560}
561
562static int receive_internal(SyncQueue *sq, int stream_idx, SyncQueueFrame frame)
563{
564 int nb_eof = 0;
565 int ret;
566
567 /* read a frame for a specific stream */
568 if (stream_idx >= 0) {
569 ret = receive_for_stream(sq, stream_idx, frame);
570 return (ret < 0) ? ret : stream_idx;
571 }
572
573 /* read a frame for any stream with available output */
574 for (unsigned int i = 0; i < sq->nb_streams; i++) {
575 ret = receive_for_stream(sq, i, frame);
576 if (ret == AVERROR_EOF || ret == AVERROR(EAGAIN)) {
577 nb_eof += (ret == AVERROR_EOF);
578 continue;
579 }
580 return (ret < 0) ? ret : i;
581 }
582
583 return (nb_eof == sq->nb_streams) ? AVERROR_EOF : AVERROR(EAGAIN);
584}
585
586int sq_receive(SyncQueue *sq, int stream_idx, SyncQueueFrame frame)
587{

Callers 1

sq_receiveFunction · 0.85

Calls 1

receive_for_streamFunction · 0.85

Tested by

no test coverage detected