From 615118dea8fb393b8746694bf1d38b47bb75a7d7 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 2 Feb 2015 22:23:51 +1100 Subject: [PATCH] theora: Remove FIXME and return GST_CUSTOM_FLOW_DROP for header packet handling This FIXME is easily fixed :) --- ext/theora/gsttheoradec.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ext/theora/gsttheoradec.c b/ext/theora/gsttheoradec.c index 11ecffd..d1a7b24 100644 --- a/ext/theora/gsttheoradec.c +++ b/ext/theora/gsttheoradec.c @@ -782,19 +782,15 @@ theora_dec_decode_buffer (GstTheoraDec * dec, GstBuffer * buf, /* switch depending on packet type. A zero byte packet is always a data * packet; we don't dereference it in that case. */ if (packet.bytes && packet.packet[0] & 0x80) { + /* header packets are not meant to be displayed - return FLOW_DROP */ if (dec->have_header) { GST_WARNING_OBJECT (GST_OBJECT (dec), "Ignoring header"); - GST_VIDEO_CODEC_FRAME_FLAG_SET (frame, - GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY); result = GST_CUSTOM_FLOW_DROP; goto done; } - result = theora_handle_header_packet (dec, &packet); - /* header packets are not meant to be displayed */ - /* FIXME : This is a temporary hack. The proper fix would be to - * not call _finish_frame() for these types of packets */ - GST_VIDEO_CODEC_FRAME_FLAG_SET (frame, - GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY); + if ((result = theora_handle_header_packet (dec, &packet)) != GST_FLOW_OK) + goto done; + result = GST_CUSTOM_FLOW_DROP; } else { result = theora_handle_data_packet (dec, &packet, frame); } -- 2.7.4