mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-22 02:13:46 +00:00
ext/theora/theoradec.c: Zero byte theora packets are valid and well-defined; don't warn on them.
Original commit message from CVS: * ext/theora/theoradec.c: (theora_dec_chain): Zero byte theora packets are valid and well-defined; don't warn on them.
This commit is contained in:
parent
1f966f466d
commit
d24ba074b7
2 changed files with 11 additions and 15 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2006-10-06 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
|
* ext/theora/theoradec.c: (theora_dec_chain):
|
||||||
|
Zero byte theora packets are valid and well-defined; don't warn on
|
||||||
|
them.
|
||||||
|
|
||||||
2006-10-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
2006-10-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* gst/tcp/gstmultifdsink.c: (gst_multi_fd_sink_class_init),
|
* gst/tcp/gstmultifdsink.c: (gst_multi_fd_sink_class_init),
|
||||||
|
|
|
@ -1189,14 +1189,13 @@ theora_dec_chain (GstPad * pad, GstBuffer * buf)
|
||||||
dec->last_timestamp = -1;
|
dec->last_timestamp = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (packet.bytes < 1)
|
|
||||||
goto wrong_size;
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (dec, "header=%02x packetno=%lld, outtime=%" GST_TIME_FORMAT,
|
GST_DEBUG_OBJECT (dec, "header=%02x packetno=%lld, outtime=%" GST_TIME_FORMAT,
|
||||||
packet.packet[0], packet.packetno, GST_TIME_ARGS (dec->last_timestamp));
|
packet.bytes ? packet.packet[0] : -1, packet.packetno,
|
||||||
|
GST_TIME_ARGS (dec->last_timestamp));
|
||||||
|
|
||||||
/* switch depending on packet type */
|
/* switch depending on packet type. A zero byte packet is always a data
|
||||||
if (packet.packet[0] & 0x80) {
|
* packet; we don't dereference it in that case. */
|
||||||
|
if (packet.bytes && packet.packet[0] & 0x80) {
|
||||||
if (dec->have_header) {
|
if (dec->have_header) {
|
||||||
GST_WARNING_OBJECT (GST_OBJECT (dec), "Ignoring header");
|
GST_WARNING_OBJECT (GST_OBJECT (dec), "Ignoring header");
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -1215,15 +1214,6 @@ done:
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
/* ERRORS */
|
|
||||||
wrong_size:
|
|
||||||
{
|
|
||||||
GST_WARNING_OBJECT (dec, "received empty packet");
|
|
||||||
dec->discont = TRUE;
|
|
||||||
result = GST_FLOW_OK;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstStateChangeReturn
|
static GstStateChangeReturn
|
||||||
|
|
Loading…
Reference in a new issue