mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
msdkdec: use decoder base class packetized flag
Instead of using a proxy of `is_packetized` flag this patch replaces it with the accessor to that flag in decoder base class, avoiding probable mismatches.
This commit is contained in:
parent
cd883427e9
commit
10d4c0c511
3 changed files with 3 additions and 6 deletions
|
@ -903,7 +903,7 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
|||
if (!thiz->initialized || thiz->do_renego) {
|
||||
/* Clear the internal adapter in re-negotiation for non-packetized
|
||||
* formats */
|
||||
if (!thiz->is_packetized)
|
||||
if (!gst_video_decoder_get_packetized (decoder))
|
||||
gst_adapter_clear (thiz->adapter);
|
||||
|
||||
if (!klass->configure || !klass->configure (thiz)) {
|
||||
|
@ -927,7 +927,7 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
|||
|
||||
memset (&bitstream, 0, sizeof (bitstream));
|
||||
|
||||
if (thiz->is_packetized) {
|
||||
if (gst_video_decoder_get_packetized (decoder)) {
|
||||
/* Packetized stream: we prefer to have a parser as a connected upstream
|
||||
* element to the decoder */
|
||||
bitstream.Data = map_info.data;
|
||||
|
@ -1132,7 +1132,7 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
|||
}
|
||||
}
|
||||
|
||||
if (!thiz->is_packetized) {
|
||||
if (!gst_video_decoder_get_packetized (decoder)) {
|
||||
/* flush out the data which has already been consumed by msdk */
|
||||
gst_adapter_flush (thiz->adapter, bitstream.DataOffset);
|
||||
}
|
||||
|
@ -1646,7 +1646,6 @@ gst_msdkdec_init (GstMsdkDec * thiz)
|
|||
thiz->tasks = g_array_new (FALSE, TRUE, sizeof (MsdkDecTask));
|
||||
thiz->hardware = PROP_HARDWARE_DEFAULT;
|
||||
thiz->async_depth = PROP_ASYNC_DEPTH_DEFAULT;
|
||||
thiz->is_packetized = TRUE;
|
||||
thiz->do_renego = TRUE;
|
||||
thiz->do_realloc = TRUE;
|
||||
thiz->force_reset_on_res_change = TRUE;
|
||||
|
|
|
@ -75,7 +75,6 @@ struct _GstMsdkDec
|
|||
|
||||
/* for packetization */
|
||||
GstAdapter *adapter;
|
||||
gboolean is_packetized;
|
||||
/* cap negotiation needed, allocation may or may not be required*/
|
||||
gboolean do_renego;
|
||||
/* re-allocation is mandatory if enabled */
|
||||
|
|
|
@ -103,7 +103,6 @@ gst_msdkvc1dec_configure (GstMsdkDec * decoder)
|
|||
gst_adapter_push (decoder->adapter, buffer);
|
||||
}
|
||||
|
||||
decoder->is_packetized = FALSE;
|
||||
gst_video_decoder_set_packetized (GST_VIDEO_DECODER (decoder), FALSE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue