summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <rishi@gnu.org>2012-11-01 22:02:39 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-11-02 09:35:27 +0100
commit60ea5d279c6c320d233a1bd41d8a0ce9f1278866 (patch)
tree7c104fd8309ddda2aacedeec25f4ada61848af84
parent74bd9b2d1d4d0cb410a10aa24290a92294643572 (diff)
vp8dec: Short circuit gst_vp8_dec_handle_frame if keyframe is missing
https://bugzilla.gnome.org/show_bug.cgi?id=687376
-rw-r--r--ext/vpx/gstvp8dec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/vpx/gstvp8dec.c b/ext/vpx/gstvp8dec.c
index 9ec177187..7dcd75b7d 100644
--- a/ext/vpx/gstvp8dec.c
+++ b/ext/vpx/gstvp8dec.c
@@ -415,7 +415,7 @@ open_codec (GstVP8Dec * dec, GstVideoCodecFrame * frame)
if (status != VPX_CODEC_OK || !stream_info.is_kf) {
GST_WARNING_OBJECT (dec, "No keyframe, skipping");
gst_video_decoder_finish_frame (GST_VIDEO_DECODER (dec), frame);
- return GST_FLOW_OK;
+ return GST_FLOW_CUSTOM_SUCCESS_1;
}
g_assert (dec->output_state == NULL);
@@ -483,8 +483,11 @@ gst_vp8_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
dec = GST_VP8_DEC (decoder);
- if (!dec->decoder_inited)
+ if (!dec->decoder_inited) {
ret = open_codec (dec, frame);
+ if (ret == GST_FLOW_CUSTOM_SUCCESS_1)
+ return GST_FLOW_OK;
+ }
deadline = gst_video_decoder_get_max_decode_time (decoder, frame);
if (deadline < 0) {