Merge commit '7d56f2fffc14ad02001ee0689bee76a759da9ede'

* commit '7d56f2fffc14ad02001ee0689bee76a759da9ede':
  mxf: Handle negative edit_rate

Conflicts:
	libavformat/mxfdec.c

See: 83cab07a4c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-02-02 05:05:11 +01:00
commit 8fb67c1026
1 changed files with 6 additions and 3 deletions

View File

@ -1462,10 +1462,13 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
if (st->duration == -1)
st->duration = AV_NOPTS_VALUE;
st->start_time = component->start_position;
if (material_track->edit_rate.num <= 0 || material_track->edit_rate.den <= 0) {
if (material_track->edit_rate.num <= 0 ||
material_track->edit_rate.den <= 0) {
av_log(mxf->fc, AV_LOG_WARNING,
"invalid edit rate (%d/%d) found on stream #%d, defaulting to 25/1\n",
material_track->edit_rate.num, material_track->edit_rate.den, st->index);
"Invalid edit rate (%d/%d) found on stream #%d, "
"defaulting to 25/1\n",
material_track->edit_rate.num,
material_track->edit_rate.den, st->index);
material_track->edit_rate = (AVRational){25, 1};
}
avpriv_set_pts_info(st, 64, material_track->edit_rate.den, material_track->edit_rate.num);