{
GstVaBaseDec parent;
- GstFlowReturn last_ret;
-
GstAV1SequenceHeaderOBU seq;
gint max_width;
gint max_height;
GstVaDecodePicture *pic;
GstVideoDecoder *vdec = GST_VIDEO_DECODER (decoder);
GstAV1FrameHeaderOBU *frame_hdr = &picture->frame_hdr;
+ GstFlowReturn ret;
/* Only output the highest spatial layer. For non output pictures,
we just use internal pool, then no negotiation needed. */
}
if (picture->spatial_id < decoder->highest_spatial_layer) {
- self->last_ret = gst_buffer_pool_acquire_buffer (self->internal_pool,
+ ret = gst_buffer_pool_acquire_buffer (self->internal_pool,
&frame->output_buffer, NULL);
- if (self->last_ret != GST_FLOW_OK) {
+ if (ret != GST_FLOW_OK) {
GST_WARNING_OBJECT (self,
"Failed to allocated output buffer from internal pool, return %s",
- gst_flow_get_name (self->last_ret));
- return self->last_ret;
+ gst_flow_get_name (ret));
+ return ret;
}
} else {
- self->last_ret = gst_video_decoder_allocate_output_frame (vdec, frame);
- if (self->last_ret != GST_FLOW_OK) {
- GST_WARNING_OBJECT (self,
- "Failed to allocated output buffer, return %s",
- gst_flow_get_name (self->last_ret));
- return self->last_ret;
+ ret = gst_video_decoder_allocate_output_frame (vdec, frame);
+ if (ret != GST_FLOW_OK) {
+ GST_WARNING_OBJECT (self, "Failed to allocated output buffer, return %s",
+ gst_flow_get_name (ret));
+ return ret;
}
}
"Outputting picture %p (system_frame_number %d)",
picture, picture->system_frame_number);
- if (self->last_ret != GST_FLOW_OK) {
- gst_av1_picture_unref (picture);
- gst_video_decoder_drop_frame (vdec, frame);
- return self->last_ret;
- }
-
if (picture->frame_hdr.show_existing_frame) {
GstVaDecodePicture *pic;
{
GstVaBaseDec parent;
- GstFlowReturn last_ret;
-
gint coded_width;
gint coded_height;
gint dpb_size;
GST_LOG_OBJECT (self,
"Outputting picture %p (poc %d)", picture, picture->pic_order_cnt);
- if (self->last_ret != GST_FLOW_OK) {
- gst_h264_picture_unref (picture);
- gst_video_decoder_drop_frame (vdec, frame);
- return self->last_ret;
- }
-
ret = gst_va_base_dec_process_output (base, frame, picture->buffer_flags);
gst_h264_picture_unref (picture);
GstVaDecodePicture *pic;
GstVideoDecoder *vdec = GST_VIDEO_DECODER (decoder);
GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
+ GstFlowReturn ret;
if (base->need_negotiation) {
if (!gst_video_decoder_negotiate (vdec)) {
}
}
- self->last_ret = gst_video_decoder_allocate_output_frame (vdec, frame);
- if (self->last_ret != GST_FLOW_OK)
+ ret = gst_video_decoder_allocate_output_frame (vdec, frame);
+ if (ret != GST_FLOW_OK)
goto error;
pic = gst_va_decode_picture_new (base->decoder, frame->output_buffer);
{
GST_WARNING_OBJECT (self,
"Failed to allocated output buffer, return %s",
- gst_flow_get_name (self->last_ret));
- return self->last_ret;
+ gst_flow_get_name (ret));
+ return ret;
}
}
{
GstVaBaseDec parent;
- GstFlowReturn last_ret;
-
gint coded_width;
gint coded_height;
gint dpb_size;
GST_LOG_OBJECT (self,
"Outputting picture %p (poc %d)", picture, picture->pic_order_cnt);
- if (self->last_ret != GST_FLOW_OK) {
- gst_h265_picture_unref (picture);
- _replace_previous_slice (self, NULL, 0);
- gst_video_decoder_drop_frame (vdec, frame);
- return self->last_ret;
- }
-
gst_buffer_replace (&frame->output_buffer, va_pic->gstbuffer);
ret = gst_va_base_dec_process_output (base, frame, picture->buffer_flags);
GstVaDecodePicture *pic;
GstBuffer *output_buffer;
GstVideoDecoder *vdec = GST_VIDEO_DECODER (decoder);
+ GstFlowReturn ret = GST_FLOW_ERROR;
if (base->need_negotiation) {
if (!gst_video_decoder_negotiate (vdec)) {
}
output_buffer = gst_video_decoder_allocate_output_buffer (vdec);
- if (!output_buffer) {
- self->last_ret = GST_FLOW_ERROR;
+ if (!output_buffer)
goto error;
- }
- self->last_ret = GST_FLOW_OK;
pic = gst_va_decode_picture_new (base->decoder, output_buffer);
gst_buffer_unref (output_buffer);
{
GST_WARNING_OBJECT (self,
"Failed to allocated output buffer, return %s",
- gst_flow_get_name (self->last_ret));
- return self->last_ret;
+ gst_flow_get_name (ret));
+ return ret;
}
}
struct _GstVaVp8Dec
{
GstVaBaseDec parent;
-
- GstFlowReturn last_ret;
};
static GstElementClass *parent_class = NULL;
GstVaDecodePicture *pic;
GstVideoDecoder *vdec = GST_VIDEO_DECODER (decoder);
GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
+ GstFlowReturn ret;
if (base->need_negotiation) {
if (!gst_video_decoder_negotiate (vdec)) {
}
}
- self->last_ret = gst_video_decoder_allocate_output_frame (vdec, frame);
- if (self->last_ret != GST_FLOW_OK)
+ ret = gst_video_decoder_allocate_output_frame (vdec, frame);
+ if (ret != GST_FLOW_OK)
goto error;
pic = gst_va_decode_picture_new (base->decoder, frame->output_buffer);
{
GST_WARNING_OBJECT (self,
"Failed to allocated output buffer, return %s",
- gst_flow_get_name (self->last_ret));
- return self->last_ret;
+ gst_flow_get_name (ret));
+ return ret;
}
}
"Outputting picture %p (system_frame_number %d)",
picture, picture->system_frame_number);
- if (self->last_ret != GST_FLOW_OK) {
- gst_vp8_picture_unref (picture);
- gst_video_decoder_drop_frame (vdec, frame);
- return self->last_ret;
- }
-
ret = gst_va_base_dec_process_output (base, frame, 0);
gst_vp8_picture_unref (picture);