Hello everyone,
I'm experimenting with a decoding video stream on one thread and processing
those frames in the second thread.
In the decoding thread for each frame, I allocate a new AVFrame and after
receiving the decoded frames with avcodec_receive_frame I put them in a
mutexed queue, I do this in a loop and sleep if the queue is full.
The processing thread continuously grabs AVFrames from the mutexed queue,
processes them, and only sleeps if the queue is empty.

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?

Thank you for your help,
Nikita
_______________________________________________
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".

Reply via email to