GstVideoDecoder *vdec = GST_VIDEO_DECODER (decoder);
GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
+ if (base->need_negotiation) {
+ if (!gst_video_decoder_negotiate (vdec)) {
+ GST_ERROR_OBJECT (self, "Failed to negotiate with downstream");
+ return GST_FLOW_NOT_NEGOTIATED;
+ }
+ }
+
self->last_ret = gst_video_decoder_allocate_output_frame (vdec, frame);
if (self->last_ret != GST_FLOW_OK)
goto error;
base->min_buffers = self->dpb_size + 4; /* dpb size + scratch surfaces */
- if (negotiation_needed) {
- base->need_negotiation = TRUE;
- if (!gst_video_decoder_negotiate (GST_VIDEO_DECODER (self))) {
- GST_ERROR_OBJECT (self, "Failed to negotiate with downstream");
- return GST_FLOW_NOT_NEGOTIATED;
- }
- }
+ base->need_negotiation = negotiation_needed;
return GST_FLOW_OK;
}
GstBuffer *output_buffer;
GstVideoDecoder *vdec = GST_VIDEO_DECODER (decoder);
+ if (base->need_negotiation) {
+ if (!gst_video_decoder_negotiate (vdec)) {
+ GST_ERROR_OBJECT (self, "Failed to negotiate with downstream");
+ return GST_FLOW_NOT_NEGOTIATED;
+ }
+ }
+
output_buffer = gst_video_decoder_allocate_output_buffer (vdec);
if (!output_buffer) {
self->last_ret = GST_FLOW_ERROR;
base->min_buffers = self->dpb_size + 4; /* dpb size + scratch surfaces */
- if (negotiation_needed) {
- base->need_negotiation = TRUE;
- if (!gst_video_decoder_negotiate (GST_VIDEO_DECODER (self))) {
- GST_ERROR_OBJECT (self, "Failed to negotiate with downstream");
- return GST_FLOW_NOT_NEGOTIATED;
- }
- }
+ base->need_negotiation = negotiation_needed;
{
/* FIXME: We don't have parser API for sps_range_extension, so
base->min_buffers = 2 + 4; /* max num pic references + scratch surfaces */
- if (negotiation_needed) {
- base->need_negotiation = TRUE;
- if (!gst_video_decoder_negotiate (GST_VIDEO_DECODER (self))) {
- GST_ERROR_OBJECT (self, "Failed to negotiate with downstream");
- return GST_FLOW_NOT_NEGOTIATED;
- }
- }
+ base->need_negotiation = negotiation_needed;
return GST_FLOW_OK;
}
GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
GstVideoDecoder *vdec = GST_VIDEO_DECODER (decoder);
+ if (base->need_negotiation) {
+ if (!gst_video_decoder_negotiate (vdec)) {
+ GST_ERROR_OBJECT (self, "Failed to negotiate with downstream");
+ return GST_FLOW_NOT_NEGOTIATED;
+ }
+ }
+
ret = gst_video_decoder_allocate_output_frame (vdec, frame);
if (ret != GST_FLOW_OK)
goto error;
base->min_buffers = 3 + 4; /* max num pic references + scratch surfaces */
- if (negotiation_needed) {
- base->need_negotiation = TRUE;
- if (!gst_video_decoder_negotiate (GST_VIDEO_DECODER (self))) {
- GST_ERROR_OBJECT (self, "Failed to negotiate with downstream");
- return GST_FLOW_NOT_NEGOTIATED;
- }
- }
+ base->need_negotiation = negotiation_needed;
return GST_FLOW_OK;
}
GstVideoDecoder *vdec = GST_VIDEO_DECODER (decoder);
GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
+ if (base->need_negotiation) {
+ if (!gst_video_decoder_negotiate (vdec)) {
+ GST_ERROR_OBJECT (self, "Failed to negotiate with downstream");
+ return GST_FLOW_NOT_NEGOTIATED;
+ }
+ }
+
self->last_ret = gst_video_decoder_allocate_output_frame (vdec, frame);
if (self->last_ret != GST_FLOW_OK)
goto error;
base->min_buffers = GST_VP9_REF_FRAMES;
- if (negotiation_needed) {
- base->need_negotiation = TRUE;
- if (!gst_video_decoder_negotiate (GST_VIDEO_DECODER (self))) {
- GST_ERROR_OBJECT (self, "Failed to negotiate with downstream");
- return GST_FLOW_NOT_NEGOTIATED;
- }
- }
+ base->need_negotiation = negotiation_needed;
return GST_FLOW_OK;
}
if (ret != GST_FLOW_OK)
return ret;
+ if (base->need_negotiation) {
+ if (!gst_video_decoder_negotiate (vdec)) {
+ GST_ERROR_OBJECT (self, "Failed to negotiate with downstream");
+ return GST_FLOW_NOT_NEGOTIATED;
+ }
+ }
+
ret = gst_video_decoder_allocate_output_frame (vdec, frame);
if (ret != GST_FLOW_OK)
goto error;