mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
theora: Remove FIXME and return GST_CUSTOM_FLOW_DROP for header packet handling
This FIXME is easily fixed :)
This commit is contained in:
parent
c35e3e7c7d
commit
615118dea8
1 changed files with 4 additions and 8 deletions
|
@ -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
|
/* switch depending on packet type. A zero byte packet is always a data
|
||||||
* packet; we don't dereference it in that case. */
|
* packet; we don't dereference it in that case. */
|
||||||
if (packet.bytes && packet.packet[0] & 0x80) {
|
if (packet.bytes && packet.packet[0] & 0x80) {
|
||||||
|
/* header packets are not meant to be displayed - return FLOW_DROP */
|
||||||
if (dec->have_header) {
|
if (dec->have_header) {
|
||||||
GST_WARNING_OBJECT (GST_OBJECT (dec), "Ignoring 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;
|
result = GST_CUSTOM_FLOW_DROP;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
result = theora_handle_header_packet (dec, &packet);
|
if ((result = theora_handle_header_packet (dec, &packet)) != GST_FLOW_OK)
|
||||||
/* header packets are not meant to be displayed */
|
goto done;
|
||||||
/* FIXME : This is a temporary hack. The proper fix would be to
|
result = GST_CUSTOM_FLOW_DROP;
|
||||||
* not call _finish_frame() for these types of packets */
|
|
||||||
GST_VIDEO_CODEC_FRAME_FLAG_SET (frame,
|
|
||||||
GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY);
|
|
||||||
} else {
|
} else {
|
||||||
result = theora_handle_data_packet (dec, &packet, frame);
|
result = theora_handle_data_packet (dec, &packet, frame);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue