After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793463 - avvidedec: gstlibav video decoder does not unmap the output frame
avvidedec: gstlibav video decoder does not unmap the output frame
Status: RESOLVED DUPLICATE of bug 740222
Product: GStreamer
Classification: Platform
Component: gst-libav
1.13.x
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-14 18:07 UTC by Vikram Fugro
Modified: 2018-02-14 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch to unmap the frame (1.02 KB, patch)
2018-02-14 18:12 UTC, Vikram Fugro
rejected Details | Review

Description Vikram Fugro 2018-02-14 18:07:22 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)
Comment 1 Vikram Fugro 2018-02-14 18:12:49 UTC
Created attachment 368350 [details] [review]
Proposed patch to unmap the frame
Comment 2 Tim-Philipp Müller 2018-02-14 18:13:44 UTC
I'm fairly sure there is an existing bug about that.
Comment 3 Vikram Fugro 2018-02-14 18:29:16 UTC
Yes, Likely https://bugzilla.gnome.org/show_bug.cgi?id=790087
Comment 4 Nicolas Dufresne (ndufresne) 2018-02-14 18:43:06 UTC
Nop, this one.

*** This bug has been marked as a duplicate of bug 740222 ***
Comment 5 Nicolas Dufresne (ndufresne) 2018-02-14 18:45:27 UTC
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.