mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
theoraenc: use th_packet_iskeyframe instead of peeking at bits
https://bugzilla.gnome.org/show_bug.cgi?id=663391
This commit is contained in:
parent
ffbe58fd5a
commit
c1aab3e0a7
1 changed files with 2 additions and 3 deletions
|
@ -781,9 +781,8 @@ theora_buffer_from_packet (GstTheoraEnc * enc, ogg_packet * packet,
|
||||||
enc->next_discont = FALSE;
|
enc->next_discont = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* the second most significant bit of the first data byte is cleared
|
/* th_packet_iskeyframe returns positive for keyframes */
|
||||||
* for keyframes */
|
if (th_packet_iskeyframe (packet) > 0) {
|
||||||
if (packet->bytes > 0 && (packet->packet[0] & 0x40) == 0) {
|
|
||||||
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
|
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
|
||||||
} else {
|
} else {
|
||||||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
|
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
|
||||||
|
|
Loading…
Reference in a new issue