mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +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;
|
||||
}
|
||||
|
||||
/* the second most significant bit of the first data byte is cleared
|
||||
* for keyframes */
|
||||
if (packet->bytes > 0 && (packet->packet[0] & 0x40) == 0) {
|
||||
/* th_packet_iskeyframe returns positive for keyframes */
|
||||
if (th_packet_iskeyframe (packet) > 0) {
|
||||
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
|
||||
} else {
|
||||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
|
||||
|
|
Loading…
Reference in a new issue