diff mbox

[FFmpeg-devel,v3,1/3] ffmpeg: set the encoding framerate when the output is CFR

Message ID 1488897559-24574-2-git-send-email-t.rapp@noa-archive.com
State Accepted
Headers show

Commit Message

Tobias Rapp March 7, 2017, 2:39 p.m. UTC
From: Anton Khirnov <anton@khirnov.net>

(cherry picked from Libav commit d10102d23c9467d4eb84f58e0cd12be284b982f6)

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
---
 ffmpeg.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Michael Niedermayer March 11, 2017, 3:07 p.m. UTC | #1
On Tue, Mar 07, 2017 at 03:39:17PM +0100, Tobias Rapp wrote:
> From: Anton Khirnov <anton@khirnov.net>
> 
> (cherry picked from Libav commit d10102d23c9467d4eb84f58e0cd12be284b982f6)
> 
> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
> ---
>  ffmpeg.c | 2 ++
>  1 file changed, 2 insertions(+)

maybe ok
is there some testcase or something for this ?

[...]
Tobias Rapp March 14, 2017, 12:43 p.m. UTC | #2
On 11.03.2017 16:07, Michael Niedermayer wrote:
> On Tue, Mar 07, 2017 at 03:39:17PM +0100, Tobias Rapp wrote:
>> From: Anton Khirnov <anton@khirnov.net>
>>
>> (cherry picked from Libav commit d10102d23c9467d4eb84f58e0cd12be284b982f6)
>>
>> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
>> ---
>>  ffmpeg.c | 2 ++
>>  1 file changed, 2 insertions(+)
>
> maybe ok
> is there some testcase or something for this ?

I used some additional av_log() calls in different encoder init 
functions during testing.

Regards,
Tobias
Tobias Rapp March 17, 2017, 11:19 a.m. UTC | #3
On 14.03.2017 13:43, Tobias Rapp wrote:
> On 11.03.2017 16:07, Michael Niedermayer wrote:
>> On Tue, Mar 07, 2017 at 03:39:17PM +0100, Tobias Rapp wrote:
>>> From: Anton Khirnov <anton@khirnov.net>
>>>
>>> (cherry picked from Libav commit
>>> d10102d23c9467d4eb84f58e0cd12be284b982f6)
>>>
>>> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
>>> ---
>>>  ffmpeg.c | 2 ++
>>>  1 file changed, 2 insertions(+)
>>
>> maybe ok
>> is there some testcase or something for this ?
>
> I used some additional av_log() calls in different encoder init
> functions during testing.

Pushed.

Thanks,
Tobias
diff mbox

Patch

diff --git a/ffmpeg.c b/ffmpeg.c
index 79c91ff..4117b64 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3309,6 +3309,8 @@  static int init_output_stream_encode(OutputStream *ost)
             enc_ctx->bits_per_raw_sample = FFMIN(dec_ctx->bits_per_raw_sample,
                                                  av_pix_fmt_desc_get(enc_ctx->pix_fmt)->comp[0].depth);
 
+        enc_ctx->framerate = ost->frame_rate;
+
         ost->st->avg_frame_rate = ost->frame_rate;
 
         if (!dec_ctx ||