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

Function avpriv_find_start_code

libavcodec/utils.c:935–966  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

933#endif
934
935const uint8_t *avpriv_find_start_code(const uint8_t *restrict p,
936 const uint8_t *end,
937 uint32_t *restrict state)
938{
939 int i;
940
941 av_assert0(p <= end);
942 if (p >= end)
943 return end;
944
945 for (i = 0; i < 3; i++) {
946 uint32_t tmp = *state << 8;
947 *state = tmp + *(p++);
948 if (tmp == 0x100 || p == end)
949 return p;
950 }
951
952 while (p < end) {
953 if (p[-1] > 1 ) p += 3;
954 else if (p[-2] ) p += 2;
955 else if (p[-3]|(p[-1]-1)) p++;
956 else {
957 p++;
958 break;
959 }
960 }
961
962 p = FFMIN(p, end) - 4;
963 *state = AV_RB32(p);
964
965 return p + 4;
966}
967
968AVCPBProperties *av_cpb_properties_alloc(size_t *size)
969{

Callers 15

avi_read_packetFunction · 0.85
avs2_probeFunction · 0.85
mxf_parse_h264_frameFunction · 0.85
avs3video_probeFunction · 0.85
parse_profile_levelFunction · 0.85
cavsvideo_probeFunction · 0.85
mpegvideo_probeFunction · 0.85
ff_rtp_send_mpegvideoFunction · 0.85
cavs_parse_frameFunction · 0.85
find_start_codeFunction · 0.85
find_next_markerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected