mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
qsv: Fix mfxFrameAllocator::Lock for encoder
Only read map is possible for encoder input system memory Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2039>
This commit is contained in:
parent
761f26080a
commit
1a7b23dc02
1 changed files with 3 additions and 1 deletions
|
@ -391,7 +391,7 @@ gst_qsv_allocator_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData * ptr)
|
|||
|
||||
if (frame->map_count == 0) {
|
||||
gst_video_frame_map (&frame->frame, &frame->info, frame->buffer,
|
||||
(GstMapFlags) GST_MAP_READWRITE);
|
||||
frame->map_flags);
|
||||
}
|
||||
|
||||
frame->map_count++;
|
||||
|
@ -653,6 +653,8 @@ gst_qsv_allocator_acquire_frame (GstQsvAllocator * allocator,
|
|||
"Unknown read/write access for video memory");
|
||||
return nullptr;
|
||||
}
|
||||
} else if ((mem_type & GST_QSV_ENCODER_IN_MEMORY) != 0) {
|
||||
map_flags = GST_MAP_READ;
|
||||
} else {
|
||||
map_flags = GST_MAP_READWRITE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue