[FFmpeg-devel] [PATCH] avcodec/utils: initialize delay in avcodec_parameters_to_context()

Hendrik Leppkes h.leppkes at gmail.com
Sat Jun 4 09:50:35 CEST 2016


On Sat, Jun 4, 2016 at 9:47 AM, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
> On Sat, Jun 4, 2016 at 4:55 AM, Michael Niedermayer
> <michael at niedermayer.cc> wrote:
>> Fixes lost codec delayy
>> Should fix Ticket5509
>>
>> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
>> ---
>>  libavcodec/utils.c |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
>> index 7b99526..4016583 100644
>> --- a/libavcodec/utils.c
>> +++ b/libavcodec/utils.c
>> @@ -4157,6 +4157,7 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
>>          codec->sample_rate     = par->sample_rate;
>>          codec->block_align     = par->block_align;
>>          codec->frame_size      = par->frame_size;
>> +        codec->delay           =
>>          codec->initial_padding = par->initial_padding;
>>          codec->seek_preroll    = par->seek_preroll;
>>          break;
>> --
>> 1.7.9.5
>>
>
> Its probably fine to set it, but delay is not the correct field for
> ffmpeg.c and/or whichever muxer is involved to be using then.
>

ie. avcodec.h docs:
Audio:
     *   For encoding, this field is unused (see initial_padding).


More information about the ffmpeg-devel mailing list