video_decode_main.cpp (78.7 KB)
video_decode.h (3.7 KB)
run command:
./video_decode MPEG4 --disable-rendering --max-perf --stats -v4l2-memory-out-plane 1 -v4l2-memory-cap-plane 1 ./decoder_test.mp4
Here is how I reproduce this issue. I tested it with 2,552 minutes of mp4 video only incoded with I frame.
it takes almost 9~10 hours to reproduce issue.
it stops working around capture_plane.getTotalDequeuedBuffers() value is 88888000~88889000
this is the end of the output of program
>>>>> number of buffers allocated/requested on the capture plane: 7
>>>>> number of planes buffers on capture plane for the currently set format: 2
>>>>> number of buffers currently queued on the capture plane: 7
>>>>> number of total number of buffers dequeued from the capture plane: 88884001
>>>>> sizeof v4l2_buf : 88, bytesused: 123, length: 2
stream read: 4000000, chunk_count: 622054
stream read: 4000000, chunk_count: 622055
stream read: 4000000, chunk_count: 622056
stream read: 4000000, chunk_count: 622057
stream read: 4000000, chunk_count: 622058
stream read: 4000000, chunk_count: 622059
stream read: 4000000, chunk_count: 622060
>>>>> number of buffers allocated/requested on the capture plane: 7
>>>>> number of planes buffers on capture plane for the currently set format: 2
>>>>> number of buffers currently queued on the capture plane: 7
>>>>> number of total number of buffers dequeued from the capture plane: 88885001
>>>>> sizeof v4l2_buf : 88, bytesused: 123, length: 2
stream read: 4000000, chunk_count: 622061
stream read: 4000000, chunk_count: 622062
stream read: 4000000, chunk_count: 622063
stream read: 4000000, chunk_count: 622064
stream read: 4000000, chunk_count: 622065
stream read: 4000000, chunk_count: 622066
stream read: 4000000, chunk_count: 622067
>>>>> number of buffers allocated/requested on the capture plane: 7
>>>>> number of planes buffers on capture plane for the currently set format: 2
>>>>> number of buffers currently queued on the capture plane: 7
>>>>> number of total number of buffers dequeued from the capture plane: 88886001
>>>>> sizeof v4l2_buf : 88, bytesused: 123, length: 2
stream read: 4000000, chunk_count: 622068
stream read: 4000000, chunk_count: 622069
stream read: 4000000, chunk_count: 622070
stream read: 4000000, chunk_count: 622071
stream read: 4000000, chunk_count: 622072
stream read: 4000000, chunk_count: 622073
stream read: 4000000, chunk_count: 622074
>>>>> number of buffers allocated/requested on the capture plane: 7
>>>>> number of planes buffers on capture plane for the currently set format: 2
>>>>> number of buffers currently queued on the capture plane: 7
>>>>> number of total number of buffers dequeued from the capture plane: 88887001
>>>>> sizeof v4l2_buf : 88, bytesused: 123, length: 2
stream read: 4000000, chunk_count: 622075
stream read: 4000000, chunk_count: 622076
stream read: 4000000, chunk_count: 622077
stream read: 4000000, chunk_count: 622078
stream read: 4000000, chunk_count: 622079
stream read: 4000000, chunk_count: 622080
stream read: 4000000, chunk_count: 622081
>>>>> number of buffers allocated/requested on the capture plane: 7
>>>>> number of planes buffers on capture plane for the currently set format: 2
>>>>> number of buffers currently queued on the capture plane: 7
>>>>> number of total number of buffers dequeued from the capture plane: 88888001
>>>>> sizeof v4l2_buf : 88, bytesused: 123, length: 2
stream read: 4000000, chunk_count: 622082
stream read: 4000000, chunk_count: 622083
stream read: 4000000, chunk_count: 622084
stream read: 4000000, chunk_count: 622085
stream read: 4000000, chunk_count: 622086
stream read: 4000000, chunk_count: 622087