SIGN IN SIGN UP

Call avcodec_receive_frame() in a loop

Since in scrcpy a video packet passed to avcodec_send_packet() is always
a complete video frame, it is sufficient to call avcodec_receive_frame()
exactly once.

In practice, it also works for audio packets: the decoder produces
exactly 1 frame for 1 input packet.

In theory, it is an implementation detail though, so
avcodec_receive_frame() should be called in a loop.
R
Romain Vimont committed
6e05d7047a9914bdba0bd833e909bc781d5b1a81
Parent: c1528cd