+2004-08-16 Wim Taymans <wim@fluendo.com>
+
+ * ext/theora/theoraenc.c: (gst_border_mode_get_type),
+ (gst_theora_enc_class_init), (theora_enc_sink_link),
+ (theora_buffer_from_packet), (theora_enc_chain):
+ Fix bug where buffers were not marked as keyframes
+ correctly.
+
2004-08-15 Zaheer Abbas Merali <zaheerabbas at merali dot org>
* ext/lame/gstlame.c: (gst_lame_vbrmode_get_type),
/* the second most significant bit of the first data byte is cleared
* for keyframes */
- if ((packet->packet[0] & 40) == 0) {
+ if ((packet->packet[0] & 0x40) == 0) {
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_KEY_UNIT);
+ GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_DELTA_UNIT);
+ } else {
+ GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_KEY_UNIT);
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_DELTA_UNIT);
}
enc->packetno++;
in_time = GST_BUFFER_TIMESTAMP (buf);
/* no packets written yet, setup headers */
- /* Theora streams begin with three headers; the initial header (with
- most of the codec setup parameters) which is mandated by the Ogg
- bitstream spec. The second header holds any comment fields. The
- third header holds the bitstream codebook. We merely need to
- make the headers, then pass them to libtheora one at a time;
- libtheora handles the additional Ogg bitstream constraints */
-
if (enc->packetno == 0) {
GstCaps *caps;
GstBuffer *buf1, *buf2, *buf3;
+ /* Theora streams begin with three headers; the initial header (with
+ most of the codec setup parameters) which is mandated by the Ogg
+ bitstream spec. The second header holds any comment fields. The
+ third header holds the bitstream codebook. We merely need to
+ make the headers, then pass them to libtheora one at a time;
+ libtheora handles the additional Ogg bitstream constraints */
+
/* first packet will get its own page automatically */
theora_encode_header (&enc->state, &op);
buf1 = theora_buffer_from_packet (enc, &op, 0, 0);