GNOME Bugzilla – Bug 793463
avvidedec: gstlibav video decoder does not unmap the output frame
Last modified: 2018-02-14 18:45:27 UTC
gstlibav video decoder does not call unmap on the output frame, just before finish_frame(). This leads to the video-frame buffer having more than 1 ref-count. As a result, (since it is now non-writable i.e ref-count > 1), there is always an unnecessary frame-copy step executed just before the output of the decoder (i.e before pushing it downstream)
Created attachment 368350 [details] [review] Proposed patch to unmap the frame
I'm fairly sure there is an existing bug about that.
Yes, Likely https://bugzilla.gnome.org/show_bug.cgi?id=790087
Nop, this one. *** This bug has been marked as a duplicate of bug 740222 ***
Review of attachment 368350 [details] [review]: This patch is not really safe, since the frame may still be read by ffmpeg for later frame construction. The proposal is to implement a remap mechanism, so we can make it read-only before pushing. This is of course specific to direct rendering mode, which need to be ported to a new FFMPEG API, hence all this may be just legacy, to be confirmed. Note that we do unmap the frame, but later on, generally upon next decoded frame.