Merge commit '93370d12164236d59645314871a1d6808b2a8ddb'

* commit '93370d12164236d59645314871a1d6808b2a8ddb':
  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: 83cab07a4c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-30 02:03:33 +02:00
commit c7fae9081d
1 changed files with 5 additions and 3 deletions

View File

@ -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);
}