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
@ -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…
x
Reference in New Issue
Block a user