mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
theoradec: Make the keyframe condition check clearer
Make the keyframe checking if statement easier to read, and add some debug when detecting a keyframe
This commit is contained in:
parent
6ac79da6a2
commit
924c44f369
1 changed files with 4 additions and 2 deletions
|
@ -277,9 +277,11 @@ theora_dec_parse (GstVideoDecoder * decoder,
|
|||
|
||||
if (av > 0) {
|
||||
data = gst_adapter_map (adapter, 1);
|
||||
/* check for keyframe; must not be header packet */
|
||||
if (!(data[0] & 0x80) && (data[0] & 0x40) == 0)
|
||||
/* check for keyframe; must not be header packet (0x80 | 0x40) */
|
||||
if (!(data[0] & 0xc0)) {
|
||||
GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
|
||||
GST_LOG_OBJECT (decoder, "Found keyframe");
|
||||
}
|
||||
gst_adapter_unmap (adapter);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue