MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / get_sbdy_offset

Function get_sbdy_offset

libavformat/iff.c:913–930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

911}
912
913static int64_t get_sbdy_offset(uint8_t *buf, int size)
914{
915 GetByteContext gb;
916
917 bytestream2_init(&gb, buf, size);
918 bytestream2_skip(&gb, 4);
919 while (bytestream2_get_bytes_left(&gb) > 8) {
920 unsigned chunk = bytestream2_get_le32(&gb);
921 unsigned size = bytestream2_get_be32(&gb);
922
923 if (chunk == MKTAG('S','B','D','Y'))
924 return bytestream2_tell(&gb);
925
926 bytestream2_skip(&gb, size + size & 1);
927 }
928
929 return 0;
930}
931
932static int iff_read_packet(AVFormatContext *s,
933 AVPacket *pkt)

Callers 1

iff_read_packetFunction · 0.85

Calls 4

bytestream2_initFunction · 0.85
bytestream2_skipFunction · 0.85
bytestream2_tellFunction · 0.85

Tested by

no test coverage detected