diff options
author | Marton Balint <cus@passwd.hu> | 2020-02-28 00:26:20 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2020-03-14 22:25:25 +0100 |
commit | aef2016bb02fba377481789bf6a84e1176b83c25 (patch) | |
tree | e8946d1a1cfff1904a3b5dad2f7d732dfec45715 /libavformat/mxfenc.c | |
parent | abbb466368c51285ca27d5e3959a16a9591e9a4c (diff) |
avformat/audiointerleave: disallow using a samples_per_frame array
Only MXF used an actual sample array, and that is unneeded there because simple
rounding rules can be used instead.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/mxfenc.c')
-rw-r--r-- | libavformat/mxfenc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 55c715d776..cbb4d9cc9a 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -1747,7 +1747,7 @@ static void mxf_write_index_table_segment(AVFormatContext *s) avio_wb32(pb, KAG_SIZE); // system item size including klv fill } else { // audio or data track if (!audio_frame_size) { - audio_frame_size = sc->aic.samples[0]*sc->aic.sample_size; + audio_frame_size = sc->frame_size; audio_frame_size += klv_fill_size(audio_frame_size); } avio_w8(pb, 1); @@ -2650,10 +2650,7 @@ static int mxf_write_header(AVFormatContext *s) return AVERROR(ENOMEM); mxf->timecode_track->index = -1; - if (!spf) - spf = ff_mxf_get_samples_per_frame(s, (AVRational){ 1, 25 }); - - if (ff_audio_interleave_init(s, spf->samples_per_frame, mxf->time_base) < 0) + if (ff_audio_interleave_init(s, 0, av_inv_q(mxf->tc.rate)) < 0) return -1; return 0; |