I had the same problem as you, but this worked for me: "I tried sending a NULL packet and using avocdec_flush_buffers() to flush out the decoded frame"
Even though it was functionally correct, that approach was too slow. If I remember correctly that was due to (re)initialization time for the decoder. However, I ended up moving all the decode to NVDEC directly anyway. ________________________________ From: Libav-user <[email protected]> on behalf of rohit khali <[email protected]> Sent: Friday, November 6, 2020 12:43 AM To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. Subject: [EXTERNAL] [Libav-user] FFMPEG to decode I frames CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. Hi, My application parses only I frames from H264 bit stream and hands it over to FFMPEG decoder. Expectation was that FFMPEG decoder immediately output decoded frames since input is I frame. However, FFMPEG can't do this especially for cases where I frame is not an IDR. I tried sending a NULL packet and using avocdec_flush_buffers() to flush out the decoded frame but this logic doesn't seem to work for all cases, maybe again depending on DPB size or POC. I was wondering if anyone else has used FFMPEG for such a use case earlier and what else I can use to immediately receive the I frames. Thanks, Rohit Khali
_______________________________________________ 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".
