opencv/modules/videoio
Maksim Shabunin 001a2c5195
Merge pull request #23606 from mshabunin:fix-ffmpeg-packet-limit
videoio/FFmpeg: increased packet read attempt limit, allow configuring it

resolves #9455
related #3225

* Use different counters for wrong packets recieved by demuxer and errors from decoder
* Allow modifying these counters via environment variables `OPENCV_FFMPEG_READ_ATTEMPTS`/`OPENCV_FFMPEG_DECODE_ATTEMPTS`
* Added logging when reading breaks at one of error limits

Notes:
* I've been able to reproduce original issue with a video file with 14 total streams (video + audio + subtitles), at some point in the video only packets from the last stream are being sent by the demuxer, thus exceeding our limit. For my specific video total number of packets from wrong stream was about 2700. I've chosen 4096 as default value.
* Default limit of decoding attempts is quite low, because I'm not sure in which cases it can be exceeded (network stream?). I tried to read 8k video from the disk, but it did not cause break at decode point.
2023-05-16 14:31:04 +03:00
..
cmake cmake: fix V4L config verification conflict with OBSENSOR 2023-03-19 10:58:47 +03:00
doc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-20 05:13:50 +00:00
include/opencv2 Added reference to Media Foundation. 2023-03-23 16:58:22 +03:00
misc Merge pull request #22939 from stopmosk:21826-python-bindings-for-videocapturewaitany 2022-12-14 22:15:02 +03:00
perf Merge pull request #15100 from Volskig:cam_multiplexing_function_v 2019-11-15 19:42:12 +03:00
src Merge pull request #23606 from mshabunin:fix-ffmpeg-packet-limit 2023-05-16 14:31:04 +03:00
test VideoCapture: apply bitstream filter to all h264/5 raw streams 2023-04-25 13:52:28 +03:00
CMakeLists.txt dnn(tflite): add 3rdparty flatbuffers with pre-generated schema 2023-02-21 16:06:19 +00:00