pkt->pts = track->sample_count;
if (codec->channels <= 0 || av_get_bits_per_sample(codec->codec_id) <= 0)
return AVERROR(EINVAL);
- track->sample_count += pkt->size / (codec->channels * av_get_bits_per_sample(codec->codec_id) / 8);
+ track->sample_count += pkt->size / (codec->channels * (int64_t)av_get_bits_per_sample(codec->codec_id) / 8);
return 0;
}