diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.c b/gst-libs/gst/vaapi/gstvaapidecoder.c index 77fe11995a..3225b9f3e6 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder.c @@ -972,5 +972,6 @@ gst_vaapi_decoder_decode_codec_data(GstVaapiDecoder *decoder) status = klass->decode_codec_data(decoder, buf, buf_size); else status = GST_VAAPI_DECODER_STATUS_SUCCESS; + gst_buffer_unmap(codec_data, &map_info); return status; } diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index 6b6908242b..aa61aeb411 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -2716,6 +2716,7 @@ decode_slice(GstVaapiDecoderH264 *decoder, GstVaapiDecoderUnit *unit) slice = GST_VAAPI_SLICE_NEW(H264, decoder, (map_info.data + unit->offset + pi->nalu.offset), pi->nalu.size); + gst_buffer_unmap(buffer, &map_info); if (!slice) { GST_ERROR("failed to allocate slice"); return GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED; diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c b/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c index ba77436a58..bb50e220e8 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c @@ -692,6 +692,7 @@ gst_vaapi_decoder_jpeg_decode(GstVaapiDecoder *base_decoder, } status = decode_buffer(decoder, map_info.data + unit->offset, unit->size); + gst_buffer_unmap(buffer, &map_info); if (status != GST_VAAPI_DECODER_STATUS_SUCCESS) return status; return GST_VAAPI_DECODER_STATUS_SUCCESS; diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c index 5c857e1f89..b32024850b 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c @@ -1211,6 +1211,7 @@ decode_slice(GstVaapiDecoderMpeg2 *decoder, GstVaapiDecoderUnit *unit) slice = GST_VAAPI_SLICE_NEW(MPEG2, decoder, (map_info.data + unit->offset), unit->size); + gst_buffer_unmap(buffer, &map_info); if (!slice) { GST_ERROR("failed to allocate slice"); return GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED; @@ -1499,6 +1500,7 @@ gst_vaapi_decoder_mpeg2_decode(GstVaapiDecoder *base_decoder, packet.offset = 4; status = parse_unit(decoder, unit, &packet); + gst_buffer_unmap(buffer, &map_info); if (status != GST_VAAPI_DECODER_STATUS_SUCCESS) return status; return decode_unit(decoder, unit, &packet); diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c index d2a0b36541..b7b6e0bc8b 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c @@ -1097,6 +1097,7 @@ gst_vaapi_decoder_mpeg4_decode(GstVaapiDecoder *base_decoder, } status = decode_buffer(decoder, map_info.data + unit->offset, unit->size); + gst_buffer_unmap(buffer, &map_info); if (status != GST_VAAPI_DECODER_STATUS_SUCCESS) return status; return GST_VAAPI_DECODER_STATUS_SUCCESS; diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c index e063cd268b..6eb701b6b1 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c @@ -1267,6 +1267,7 @@ gst_vaapi_decoder_vc1_decode(GstVaapiDecoder *base_decoder, } status = decode_buffer(decoder, map_info.data + unit->offset, unit->size); + gst_buffer_unmap(buffer, &map_info); if (status != GST_VAAPI_DECODER_STATUS_SUCCESS) return status; return GST_VAAPI_DECODER_STATUS_SUCCESS;