mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
vp[89]dec: Drop frames that have no output buffer because of errors
finish_frame() assumes that there is an output buffer.
This commit is contained in:
parent
b4aaa11f97
commit
627e492b7e
2 changed files with 6 additions and 6 deletions
|
@ -430,12 +430,12 @@ open_codec (GstVP8Dec * dec, GstVideoCodecFrame * frame)
|
||||||
if (status != VPX_CODEC_OK) {
|
if (status != VPX_CODEC_OK) {
|
||||||
GST_WARNING_OBJECT (dec, "VPX preprocessing error: %s",
|
GST_WARNING_OBJECT (dec, "VPX preprocessing error: %s",
|
||||||
gst_vpx_error_name (status));
|
gst_vpx_error_name (status));
|
||||||
gst_video_decoder_finish_frame (GST_VIDEO_DECODER (dec), frame);
|
gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame);
|
||||||
return GST_FLOW_CUSTOM_SUCCESS_1;
|
return GST_FLOW_CUSTOM_SUCCESS_1;
|
||||||
}
|
}
|
||||||
if (!stream_info.is_kf) {
|
if (!stream_info.is_kf) {
|
||||||
GST_WARNING_OBJECT (dec, "No keyframe, skipping");
|
GST_WARNING_OBJECT (dec, "No keyframe, skipping");
|
||||||
gst_video_decoder_finish_frame (GST_VIDEO_DECODER (dec), frame);
|
gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame);
|
||||||
return GST_FLOW_CUSTOM_SUCCESS_1;
|
return GST_FLOW_CUSTOM_SUCCESS_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -579,7 +579,7 @@ gst_vp8_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
gst_vp8_dec_image_to_buffer (dec, img, frame->output_buffer);
|
gst_vp8_dec_image_to_buffer (dec, img, frame->output_buffer);
|
||||||
ret = gst_video_decoder_finish_frame (decoder, frame);
|
ret = gst_video_decoder_finish_frame (decoder, frame);
|
||||||
} else {
|
} else {
|
||||||
gst_video_decoder_finish_frame (decoder, frame);
|
gst_video_decoder_drop_frame (decoder, frame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -426,12 +426,12 @@ open_codec (GstVP9Dec * dec, GstVideoCodecFrame * frame)
|
||||||
if (status != VPX_CODEC_OK) {
|
if (status != VPX_CODEC_OK) {
|
||||||
GST_WARNING_OBJECT (dec, "VPX preprocessing error: %s",
|
GST_WARNING_OBJECT (dec, "VPX preprocessing error: %s",
|
||||||
gst_vpx_error_name (status));
|
gst_vpx_error_name (status));
|
||||||
gst_video_decoder_finish_frame (GST_VIDEO_DECODER (dec), frame);
|
gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame);
|
||||||
return GST_FLOW_CUSTOM_SUCCESS_1;
|
return GST_FLOW_CUSTOM_SUCCESS_1;
|
||||||
}
|
}
|
||||||
if (!stream_info.is_kf) {
|
if (!stream_info.is_kf) {
|
||||||
GST_WARNING_OBJECT (dec, "No keyframe, skipping");
|
GST_WARNING_OBJECT (dec, "No keyframe, skipping");
|
||||||
gst_video_decoder_finish_frame (GST_VIDEO_DECODER (dec), frame);
|
gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame);
|
||||||
return GST_FLOW_CUSTOM_SUCCESS_1;
|
return GST_FLOW_CUSTOM_SUCCESS_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -584,7 +584,7 @@ gst_vp9_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
||||||
gst_vp9_dec_image_to_buffer (dec, img, frame->output_buffer);
|
gst_vp9_dec_image_to_buffer (dec, img, frame->output_buffer);
|
||||||
ret = gst_video_decoder_finish_frame (decoder, frame);
|
ret = gst_video_decoder_finish_frame (decoder, frame);
|
||||||
} else {
|
} else {
|
||||||
gst_video_decoder_finish_frame (decoder, frame);
|
gst_video_decoder_drop_frame (decoder, frame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue