This might not be the right place to ask, but I figured I'd give it a shot.
There's a weird issue with ffmpeg-mt's av_read_frame() and H.264 files.
According to avcodec.h, when using multi-threaded decoding there is a frame
delay equal to the number of threads specified as (I assume) the frames are
cached. This is all fine, but the problem is that av_read_frame() returns
-32 (instead of a successful 0) after all the frames are read, WITHOUT
taking into account the frames delayed by the threading. So, it is useless
to rely on this return value because it is always going to be wrong by the
number of threads used for decoding. What is interesting is that even though
it is returning -32, it is still reading frames properly and
avcodec_decode_video2() is seeing them and setting got_picture_ptr
correctly. So, I've had to modify my loop to completely ignore the return
value from av_read_frame() and instead use the frame count from
AVFormatContext. This works OK with formats that store frame counts, but
what would I do if I was working with MTS or some other format that doesn't
have a frame count?
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to