Lines Matching refs:sample_count
344 int64_t sample_count = 0;
395 sample_count = avio_rl64(pb);
397 if (data_size < 0 || sample_count < 0) {
398 av_log(s, AV_LOG_ERROR, "negative data_size and/or sample_count in "
399 "ds64: data_size = %"PRId64", sample_count = %"PRId64"\n",
400 data_size, sample_count);
467 if (!sample_count)
468 sample_count = (!wav->rifx ? avio_rl32(pb) : avio_rb32(pb));
617 && sample_count > 0 && st->codecpar->ch_layout.nb_channels > 1
618 && sample_count % st->codecpar->ch_layout.nb_channels == 0) {
620 sample_count /st->codecpar->bit_rate - 1.0) < 0.3)
621 sample_count /= st->codecpar->ch_layout.nb_channels;
624 if (data_size > 0 && sample_count && st->codecpar->ch_layout.nb_channels &&
625 (data_size << 3) / sample_count / st->codecpar->ch_layout.nb_channels > st->codecpar->bits_per_coded_sample + 1) {
626 av_log(s, AV_LOG_WARNING, "ignoring wrong sample_count %"PRId64"\n", sample_count);
627 sample_count = 0;
632 if (st->codecpar->codec_id == AV_CODEC_ID_G729 && sample_count && (data_size << 3) > sample_count) {
633 av_log(s, AV_LOG_WARNING, "ignoring wrong sample_count %"PRId64"\n", sample_count);
634 sample_count = 0;
637 if (!sample_count || av_get_exact_bits_per_sample(st->codecpar->codec_id) > 0)
642 sample_count = (data_size << 3)
646 if (sample_count)
647 st->duration = sample_count;