Skip to content

Commit c1caf53

Browse files
author
Valentin Noel
committed
Wrapping: fix double ticks_per_frame compensation into video codec
1 parent 54a6e3e commit c1caf53

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/AvTranscoder/file/OutputFile.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,13 @@ IOutputStream& OutputFile::addVideoStream( const VideoCodec& videoDesc )
6767
_stream->codec->width = videoDesc.getAVCodecContext()->width;
6868
_stream->codec->height = videoDesc.getAVCodecContext()->height;
6969
_stream->codec->bit_rate = videoDesc.getAVCodecContext()->bit_rate;
70-
_stream->codec->ticks_per_frame = videoDesc.getAVCodecContext()->ticks_per_frame;
7170
_stream->codec->pix_fmt = videoDesc.getAVCodecContext()->pix_fmt;
7271
_stream->codec->profile = videoDesc.getAVCodecContext()->profile;
7372
_stream->codec->level = videoDesc.getAVCodecContext()->level;
7473

75-
// need to set the time_base on the AVCodecContext and the AVStream...
74+
// need to set the time_base on the AVCodecContext and the AVStream
75+
// compensating the frame rate with the ticks_per_frame and keeping
76+
// a coherent reading speed.
7677
av_reduce(
7778
&_stream->codec->time_base.num,
7879
&_stream->codec->time_base.den,

0 commit comments

Comments
 (0)