lavf/movenc: use framerate correctly in mov_write_tmcd_tag
Current code uses its inverse.
This commit is contained in:
parent
6ad79047a7
commit
7ec8229982
@ -2353,8 +2353,8 @@ static int mov_write_tmcd_tag(AVIOContext *pb, MOVTrack *track)
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
frame_duration = av_rescale(track->timescale, track->st->avg_frame_rate.num, track->st->avg_frame_rate.den);
|
frame_duration = av_rescale(track->timescale, track->st->avg_frame_rate.den, track->st->avg_frame_rate.num);
|
||||||
nb_frames = ROUNDED_DIV(track->st->avg_frame_rate.den, track->st->avg_frame_rate.num);
|
nb_frames = ROUNDED_DIV(track->st->avg_frame_rate.num, track->st->avg_frame_rate.den);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nb_frames > 255) {
|
if (nb_frames > 255) {
|
||||||
@ -6234,7 +6234,7 @@ static int mov_create_timecode_track(AVFormatContext *s, int index, int src_inde
|
|||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
track->par->codec_type = AVMEDIA_TYPE_DATA;
|
track->par->codec_type = AVMEDIA_TYPE_DATA;
|
||||||
track->par->codec_tag = track->tag;
|
track->par->codec_tag = track->tag;
|
||||||
track->st->avg_frame_rate = av_inv_q(rate);
|
track->st->avg_frame_rate = rate;
|
||||||
|
|
||||||
/* the tmcd track just contains one packet with the frame number */
|
/* the tmcd track just contains one packet with the frame number */
|
||||||
pkt->data = data;
|
pkt->data = data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user