Merge commit 'cfbdd7ffbd9fe14d110fd1bb89bf52f0f7bde016'
* commit 'cfbdd7ffbd9fe14d110fd1bb89bf52f0f7bde016': rtpenc: base max_frames_per_packet on avg_frame_rate, not codec timebase Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
bd148ce07d
@ -168,7 +168,12 @@ static int rtp_write_header(AVFormatContext *s1)
|
||||
}
|
||||
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
/* FIXME: We should round down here... */
|
||||
s->max_frames_per_packet = av_rescale_q(s1->max_delay, (AVRational){1, 1000000}, st->codec->time_base);
|
||||
if (st->avg_frame_rate.num > 0 && st->avg_frame_rate.den > 0) {
|
||||
s->max_frames_per_packet = av_rescale_q(s1->max_delay,
|
||||
(AVRational){1, 1000000},
|
||||
av_inv_q(st->avg_frame_rate));
|
||||
} else
|
||||
s->max_frames_per_packet = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user