Logo Search packages:      
Sourcecode: libtheora version File versions  Download package

int th_packet_iskeyframe ( ogg_packet *  _op  ) 

Determines whether a theora packet is a key frame or not. This function does no verification beyond checking the packet type and key frame bits, so it should not be used for bitstream identification; use th_decode_headerin() for that. As per the Theora specification, an empty (0-byte) packet is treated as a delta frame (with no coded blocks).

_op An ogg_packet containing encoded Theora data.
Return values:
1 The packet contains a key frame.
0 The packet contains a delta frame.
-1 The packet is not a video data packet.

Definition at line 381 of file internal.c.

Referenced by theora_packet_iskeyframe().

  return _op->bytes<=0?0:_op->packet[0]&0x80?-1:!(_op->packet[0]&0x40);

Generated by  Doxygen 1.6.0   Back to index