Lines Matching refs:size
76 { "max_size", "max size of single packet", OFFSET(max_size), AV_OPT_TYPE_INT, { .i64 = 4096 }, 1024, 1 << 22, DEC },
131 /* return the size of the found tag */
135 int64_t size;
140 size = next_tag(pb, &tag, wav->rifx);
143 wav_seek_tag(wav, pb, size, SEEK_CUR);
145 return size;
176 static int wav_parse_fmt_tag(AVFormatContext *s, int64_t size, AVStream *st)
183 ret = ff_get_wav_header(s, pb, st->codecpar, size, wav->rifx);
195 static int wav_parse_xma2_tag(AVFormatContext *s, int64_t size, AVStream *st)
200 if (size < 36)
211 if (size != (32 + ((version==3)?0:8) + 4*num_streams))
234 avio_seek(pb, -size, SEEK_CUR);
235 if ((ret = ff_get_extradata(s, st->codecpar, pb, size)) < 0)
259 static int wav_parse_bext_tag(AVFormatContext *s, int64_t size)
311 if (size > 602) {
313 size -= 602;
315 if (!(coding_history = av_malloc(size + 1)))
318 if ((ret = ffio_read_size(s->pb, coding_history, size)) < 0) {
323 coding_history[size] = 0;
343 int64_t size, av_uninit(data_size);
377 /* read chunk size */
389 size = avio_rl32(pb);
390 if (size < 24)
392 avio_rl64(pb); /* RIFF size */
403 avio_skip(pb, size - 24); /* skip rest of ds64 chunk */
414 size = next_tag(pb, &tag, wav->rifx);
415 next_tag_ofs = avio_tell(pb) + size;
423 if (!got_xma2 && !got_fmt && (ret = wav_parse_fmt_tag(s, size, st)) < 0) {
432 if (!got_fmt && !got_xma2 && (ret = wav_parse_xma2_tag(s, size, st)) < 0) {
448 } else if (size != 0xFFFFFFFF) {
449 data_size = size;
450 next_tag_ofs = wav->data_end = size ? next_tag_ofs : INT64_MAX;
452 av_log(s, AV_LOG_WARNING, "Ignoring maximum wav data size, "
463 if (!(pb->seekable & AVIO_SEEKABLE_NORMAL) || (!(rf64 && !bw64) && !size))
471 if ((ret = wav_parse_bext_tag(s, size)) < 0)
480 if (size != MKTAG('0','2','0','0')) {
500 size = avio_rl24(pb);
501 wav->smv_data_ofs = avio_tell(pb) + (size - 5) * 3;
519 if (size < 4) {
525 ff_read_riff_info(s, size - 4);
568 if (size >= 4 && got_fmt && st->codecpar->sample_rate > 0) {
572 if (size >= nb_cues * 24LL + 4LL) {
611 av_log(s, AV_LOG_WARNING, "Data size %"PRId64" is too large\n", data_size);
686 * @return the size of the found chunk
691 int64_t size;
695 size = avio_rl64(pb);
696 if (size <= 24 || size > INT64_MAX - 8)
699 return size;
700 avio_skip(pb, FFALIGN(size, INT64_C(8)) - 24);
707 int ret, size;
740 size = avio_rl24(s->pb);
741 if (size > wav->smv_block_size) {
745 ret = av_get_packet(s->pb, pkt, size);
783 size = wav->max_size;
785 if (size < st->codecpar->block_align)
786 size = st->codecpar->block_align;
787 size = (size / st->codecpar->block_align) * st->codecpar->block_align;
789 size = FFMIN(size, left);
790 ret = av_get_packet(s->pb, pkt, size);
867 int64_t size, data_ofs = 0;
896 size = avio_rl64(pb);
897 if (size <= 24 || INT64_MAX - size < avio_tell(pb))
901 /* subtract chunk header size - normal wav file doesn't count it */
902 ret = ff_get_wav_header(s, pb, st->codecpar, size - 24, 0);
905 avio_skip(pb, FFALIGN(size, INT64_C(8)) - size);
914 avio_skip(pb, FFALIGN(size, INT64_C(8)) - 32);
916 wav->data_end = avio_tell(pb) + size - 24;
922 avio_skip(pb, size - 24);
929 end = start + FFALIGN(size, INT64_C(8)) - 24;
935 if (avio_feof(pb) || (cur = avio_tell(pb)) < 0 || cur > end - 8 /* = tag + size */)
961 avio_skip(pb, FFALIGN(size, INT64_C(8)) - 24);