Nikita Vaňků (12023-04-24): > I do this in a loop and sleep if the queue is full.
> and only sleeps if the queue is empty. I hope “sleep” here is a simplification for “pthread_cond_wait”. > This works completely fine as long as I use software decoding, but if I > change the whole thing into any HW accelerated backend (doesn't matter if > its DXVA2 or VAAPI) and receive any HW frames it fails and constantly > prints various errors like this: > > avcodec_send_packet: "Invalid data found when processing input" > [AVHWFramesContext @ 000001ca9afb9e80] Static surface pool size exceeded. > [h264 @ 000001ca9ae7d9c0] get_buffer() failed > [h264 @ 000001ca9ae7d9c0] thread_get_buffer() failed > [h264 @ 000001ca9ae7d9c0] decode_slice_header error > [h264 @ 000001ca9ae7d9c0] no frame! > > Why is this happening? Is my approach even legal for this use? Did I miss > something in the documentation? Hardware frames often resize in the memory of the device or its driver. Therefore, only a limited number of them can exist at a time. It seems your queue is too large for that. You probably need to copy the frame at least once. Or maybe you had a memory leak and you have not noticed in with software frames because your memory is huge. Regards, -- Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ Libav-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
