diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-26 03:03:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-26 03:13:54 +0200 |
commit | 33f39c02aa0d6d2479a95669fe36cd45fe7f3bb8 (patch) | |
tree | f4160a4998b45b52fc6355a7eb06da27104437af | |
parent | 40821980ae867ae4d500dfb228f9f858f81d4907 (diff) | |
download | ffmpeg-33f39c02aa0d6d2479a95669fe36cd45fe7f3bb8.tar.gz |
mxfdec: pass correct context to av_timecode_init()
fixes null ptr dereference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mxfdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index bb580e1447..85de3a7140 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -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; } |