mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-05 06:40:03 +00:00
mxfdec: pass correct context to av_timecode_init()
fixes null ptr dereference Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
40821980ae
commit
33f39c02aa
@ -1354,7 +1354,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
|
||||
if ((component = mxf_resolve_strong_ref(mxf, &material_track->sequence_ref, TimecodeComponent))) {
|
||||
mxf_tc = (MXFTimecodeComponent*)component;
|
||||
flags = mxf_tc->drop_frame == 1 ? AV_TIMECODE_FLAG_DROPFRAME : 0;
|
||||
if (av_timecode_init(&tc, mxf_tc->rate, flags, mxf_tc->start_frame, mxf) == 0) {
|
||||
if (av_timecode_init(&tc, mxf_tc->rate, flags, mxf_tc->start_frame, mxf->fc) == 0) {
|
||||
mxf_add_timecode_metadata(&mxf->fc->metadata, "timecode", &tc);
|
||||
}
|
||||
}
|
||||
@ -1371,7 +1371,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
|
||||
|
||||
mxf_tc = (MXFTimecodeComponent*)component;
|
||||
flags = mxf_tc->drop_frame == 1 ? AV_TIMECODE_FLAG_DROPFRAME : 0;
|
||||
if (av_timecode_init(&tc, mxf_tc->rate, flags, mxf_tc->start_frame, mxf) == 0) {
|
||||
if (av_timecode_init(&tc, mxf_tc->rate, flags, mxf_tc->start_frame, mxf->fc) == 0) {
|
||||
mxf_add_timecode_metadata(&mxf->fc->metadata, "timecode", &tc);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user