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

Function ff_dca_core_parse

libavcodec/dca_core.c:1796–1827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1794}
1795
1796int ff_dca_core_parse(DCACoreDecoder *s, const uint8_t *data, int size)
1797{
1798 int ret;
1799
1800 s->ext_audio_mask = 0;
1801 s->xch_pos = s->xxch_pos = s->x96_pos = 0;
1802
1803 if ((ret = init_get_bits8(&s->gb, data, size)) < 0)
1804 return ret;
1805 s->gb_in = s->gb;
1806
1807 if ((ret = parse_frame_header(s)) < 0)
1808 return ret;
1809 if ((ret = alloc_sample_buffer(s)) < 0)
1810 return ret;
1811 if ((ret = parse_frame_data(s, HEADER_CORE, 0)) < 0)
1812 return ret;
1813 if ((ret = parse_optional_info(s)) < 0)
1814 return ret;
1815
1816 // Workaround for DTS in WAV
1817 if (s->frame_size > size)
1818 s->frame_size = size;
1819
1820 if (ff_dca_seek_bits(&s->gb, s->frame_size * 8)) {
1821 av_log(s->avctx, AV_LOG_ERROR, "Read past end of core frame\n");
1822 if (s->avctx->err_recognition & AV_EF_EXPLODE)
1823 return AVERROR_INVALIDDATA;
1824 }
1825
1826 return 0;
1827}
1828
1829int ff_dca_core_parse_exss(DCACoreDecoder *s, const uint8_t *data, DCAExssAsset *asset)
1830{

Callers 1

dcadec_decode_frameFunction · 0.85

Calls 7

init_get_bits8Function · 0.85
parse_frame_dataFunction · 0.85
parse_optional_infoFunction · 0.85
ff_dca_seek_bitsFunction · 0.85
av_logFunction · 0.85
parse_frame_headerFunction · 0.70
alloc_sample_bufferFunction · 0.70

Tested by

no test coverage detected