mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
mxfdec: check edit_rate also for physical_track
Previously only the edit_rate of material_track was checked. If it's negative, it causes assertion failures in av_rescale_rnd. Reviewed-by: Tim Nicholson <nichot20-at-yahoo.com@ffmpeg.org> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
parent
6f37226b68
commit
047bf82c18
@ -1776,6 +1776,16 @@ static int mxf_parse_physical_source_package(MXFContext *mxf, MXFTrack *source_t
|
||||
continue;
|
||||
}
|
||||
|
||||
if (physical_track->edit_rate.num <= 0 ||
|
||||
physical_track->edit_rate.den <= 0) {
|
||||
av_log(mxf->fc, AV_LOG_WARNING,
|
||||
"Invalid edit rate (%d/%d) found on structural"
|
||||
" component #%d, defaulting to 25/1\n",
|
||||
physical_track->edit_rate.num,
|
||||
physical_track->edit_rate.den, i);
|
||||
physical_track->edit_rate = (AVRational){25, 1};
|
||||
}
|
||||
|
||||
for (k = 0; k < physical_track->sequence->structural_components_count; k++) {
|
||||
if (!(mxf_tc = mxf_resolve_timecode_component(mxf, &physical_track->sequence->structural_components_refs[k])))
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user