vpxdec: Fix direct rendering, avoid holding write access
authorHavard Graff <havard.graff@gmail.com>
Wed, 22 May 2019 09:16:56 +0000 (11:16 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 23 Aug 2021 14:31:37 +0000 (14:31 +0000)
commit068c2a71ba58a0a68e6e7258025be81537822249
tree86c50df20ca3249aebb886df3828f49009d03da0
parent660517435837a09098c1ade9662c4aaa31176e73
vpxdec: Fix direct rendering, avoid holding write access

When a buffer is pushed downstream, we should try not to hold the
buffer mapped with write access. Doing so would often lead to
an unneccesary memcpy later.

For instance, gst_buffer_make_writable() in
gst_video_decoder_finish_frame() will cause a memcpy because of
_memory_get_exclusive_reference().

We know that we can perform a two-step remap when using system
memory, as this will not cause the location of the memory to
change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/812>
ext/vpx/gstvpxdec.c
ext/vpx/gstvpxdec.h