mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
msdkdec: explain the the extra ref of input buffer
This commit is contained in:
parent
74f297f31b
commit
f974246647
1 changed files with 7 additions and 0 deletions
|
@ -878,6 +878,13 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
|||
}
|
||||
}
|
||||
|
||||
/* Current frame-codec could be pushed and released before this
|
||||
* function ends -- because msdkdec pushes the oldest frame,
|
||||
* according its PTS, and it could be this very same frame-codec
|
||||
* among others pending frame-codecs.
|
||||
*
|
||||
* Instead of copying the input data into the mfxBitstream, let's
|
||||
* keep an extra reference to frame-codec's input buffer */
|
||||
input_buffer = gst_buffer_ref (frame->input_buffer);
|
||||
if (!gst_buffer_map (input_buffer, &map_info, GST_MAP_READ)) {
|
||||
gst_buffer_unref (input_buffer);
|
||||
|
|
Loading…
Reference in a new issue