Commit c7fae908 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '93370d12'

* commit '93370d12':
  mxfdec: set audio timebase to 1/samplerate

Conflicts:
	libavformat/mxfdec.c
	tests/ref/fate/mxf-demux
	tests/ref/seek/lavf-mxf
	tests/ref/seek/lavf-mxf_d10

See: 83cab07aMerged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents bbe50a80 93370d12
......@@ -1569,11 +1569,13 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
st->codec->bits_per_coded_sample = descriptor->bits_per_sample;
if (descriptor->sample_rate.den > 0) {
avpriv_set_pts_info(st, 64, descriptor->sample_rate.den, descriptor->sample_rate.num);
st->codec->sample_rate = descriptor->sample_rate.num / descriptor->sample_rate.den;
avpriv_set_pts_info(st, 64, descriptor->sample_rate.den, descriptor->sample_rate.num);
} else {
av_log(mxf->fc, AV_LOG_WARNING, "invalid sample rate (%d/%d) found for stream #%d, time base forced to 1/48000\n",
descriptor->sample_rate.num, descriptor->sample_rate.den, st->index);
av_log(mxf->fc, AV_LOG_WARNING,
"invalid sample rate (%d/%d) found for stream #%d, time base forced to 1/48000\n",
descriptor->sample_rate.num, descriptor->sample_rate.den,
st->index);
avpriv_set_pts_info(st, 64, 1, 48000);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment