mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
h264: don't create sub-buffer for slice data.
This commit is contained in:
parent
9bba1e5fe3
commit
3f60f136cc
1 changed files with 2 additions and 9 deletions
|
@ -2675,16 +2675,9 @@ decode_slice(GstVaapiDecoderH264 *decoder, GstVaapiDecoderUnitH264 *unit)
|
||||||
return GST_VAAPI_DECODER_STATUS_SUCCESS;
|
return GST_VAAPI_DECODER_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
unit->base.buffer = gst_buffer_create_sub(
|
|
||||||
GST_VAAPI_DECODER_CODEC_FRAME(decoder)->input_buffer,
|
|
||||||
unit->base.offset, unit->base.size);
|
|
||||||
if (!unit->base.buffer) {
|
|
||||||
GST_ERROR("failed to allocate slice data");
|
|
||||||
return GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED;
|
|
||||||
}
|
|
||||||
|
|
||||||
slice = GST_VAAPI_SLICE_NEW(H264, decoder,
|
slice = GST_VAAPI_SLICE_NEW(H264, decoder,
|
||||||
GST_BUFFER_DATA(unit->base.buffer) + nalu->offset, nalu->size);
|
(GST_BUFFER_DATA(GST_VAAPI_DECODER_CODEC_FRAME(decoder)->input_buffer) +
|
||||||
|
unit->base.offset + nalu->offset), nalu->size);
|
||||||
if (!slice) {
|
if (!slice) {
|
||||||
GST_ERROR("failed to allocate slice");
|
GST_ERROR("failed to allocate slice");
|
||||||
return GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED;
|
return GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED;
|
||||||
|
|
Loading…
Reference in a new issue