On Wed, May 4, 2016 at 12:44 PM, wm4 <nfx...@googlemail.com> wrote:
> On Tue,  3 May 2016 15:21:00 -0400
> "Ronald S. Bultje" <rsbul...@gmail.com> wrote:
>
>> I have no idea why the first hunk uses ost->enc_ctx, because as far as
>> I understand, that is never used in case of -c:v copy, but this code
>> block is only entered if encoding_needed=0, which means stream_copy=1.
>> My point being: review from someone that knows this really well would
>> be appreciated.
>> ---
>>  ffmpeg.c | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/ffmpeg.c b/ffmpeg.c
>> index adc3ff7..c72333e 100644
>> --- a/ffmpeg.c
>> +++ b/ffmpeg.c
>> @@ -2678,7 +2678,7 @@ static int init_output_stream(OutputStream *ost, char 
>> *error, int error_len)
>>          ost->st->time_base = av_add_q(ost->enc_ctx->time_base, 
>> (AVRational){0, 1});
>>          ost->st->codec->codec= ost->enc_ctx->codec;
>>      } else {
>> -        ret = av_opt_set_dict(ost->enc_ctx, &ost->encoder_opts);
>> +        ret = av_opt_set_dict(ost->st->codec, &ost->encoder_opts);
>>          if (ret < 0) {
>>             av_log(NULL, AV_LOG_FATAL,
>>                    "Error setting up codec context options.\n");
>> @@ -3011,6 +3011,10 @@ static int transcode_init(void)
>>                  break;
>>              case AVMEDIA_TYPE_VIDEO:
>>                  enc_ctx->pix_fmt            = dec_ctx->pix_fmt;
>> +                enc_ctx->colorspace         = dec_ctx->colorspace;
>> +                enc_ctx->color_range        = dec_ctx->color_range;
>> +                enc_ctx->color_primaries    = dec_ctx->color_primaries;
>> +                enc_ctx->color_trc          = dec_ctx->color_trc;
>>                  enc_ctx->width              = dec_ctx->width;
>>                  enc_ctx->height             = dec_ctx->height;
>>                  enc_ctx->has_b_frames       = dec_ctx->has_b_frames;
>
> Shouldn't it copy the codecpar instead?

Eventually, ffmpeg.c has not been migrated afaik.

- Hendrik
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to