Closed windows-server-2003 closed 3 years ago
I found that the actual freeze cause was Util_convert_seconds_to_time() function not ffmpeg. The ffmpeg does fail at first, but it's only first few frames after that everything will be decoded correctly.
anyway, I fixed Util_convert_seconds_to_time() so the app won't freeze anymore.
Thanks
Current implementation repeats reading a single frame and trying to decode it alone, but decoding a B-frame requires some frames after it. As a result, avcodec_receive_frame() returns AVERROR(EAGAIN) (refer to https://ffmpeg.org/doxygen/3.4/group__lavc__decoding.html#ga11e6542c4e66d3028668788a1a74217c). The actual behavior of the app is a complete freeze. This might be another issue because I think it is better to show an error message and stop playing. If you download a random youtube video with
youtube-dl -f 160 [link]
, it probably contains B-frames, so you can test with it.I will work on this issue and open a PR if that's not a problem for you.