avcapture RESET_PCR and restart buffering in loop
When using avcapture access on MacOSX with master 4.0 git, the playback is completely jerky and the following happens in loop:
[00007fa3658b8000] main input debug: Buffering 88%
[00007fa3658b8000] main input debug: Buffering 89%
[00007fa3658b8000] main input debug: Buffering 90%
[00007fa366842400] main decoder warning: decoder/packetizer fifo full (data not consumed quickly enough), resetting fifo!
[00007fa3658b8000] main input debug: Buffering 91%
[00007fa3658b8000] main input debug: Buffering 92%
[00007fa3658b8000] main input debug: Buffering 93%
[00007fa3658b8000] main input debug: Buffering 94%
[00007fa3658b8000] main input debug: Buffering 95%
[00007fa3658b8000] main input debug: Buffering 96%
[00007fa3658b8000] main input debug: Buffering 97%
[00007fa3658b8000] main input debug: Buffering 98%
[00007fa3658b8000] main input debug: Buffering 99%
[00007fa3658b8000] main input debug: Stream buffering done (301 ms in 9994 ms)
[00007fa3658b8000] main input debug: Decoder wait done in 0 ms
[00007fa364abc7b0] main vout display debug: picture displayed late (missing 13 ms)
[00007fa364abc7b0] main vout display debug: picture displayed late (missing 524 ms)
[00007fa364abc7b0] main vout display debug: picture displayed late (missing 481 ms)
[00007fa364abc7b0] main vout display debug: picture displayed late (missing 439 ms)
[00007fa364abc7b0] main vout display debug: picture displayed late (missing 397 ms)
[00007fa364abc7b0] main vout display debug: picture displayed late (missing 356 ms)
[00007fa364abc7b0] main vout display debug: picture displayed late (missing 87 ms)
[00007fa364abc7b0] main vout display debug: picture displayed late (missing 73 ms)
[00007fa364abc7b0] main vout display debug: picture displayed late (missing 59 ms)
[00007fa3658b8000] main input error: ES_OUT_SET_(GROUP_)PCR is called 44 ms late (jitter of 9337 ms ignored)
[00007fa3658b8000] main input debug: ES_OUT_RESET_PCR called
[00007fa366842400] main decoder debug: Received first picture
[00007fa3658b8000] main input debug: Buffering 0%
[00007fa3658b8000] main input debug: Buffering 1%
Full logs: logs_camera.txt
Reproductible 100%.
Same behaviour on 3.0 branch with the official release, which makes the avcapture unusable.