On Sat, Jun 04, 2016 at 09:47:47AM +0200, Hendrik Leppkes wrote: > On Sat, Jun 4, 2016 at 4:55 AM, Michael Niedermayer > <mich...@niedermayer.cc> wrote: > > Fixes lost codec delayy > > Should fix Ticket5509 > > > > Signed-off-by: Michael Niedermayer <mich...@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.
delay must be set for the demuxer (required by API and used by applications), avcodec_parameters_to_context() has no knowledge about working on demuxer or muxer side contexts unless i miss something. (i tried avctx->codec but its never set) I can add a parameter to avcodec_parameters_to_context() that indicates if its for the demuxer or muxer or add a avcodec_parameters_to_context2() or a avcodec_parameters_to_context_demuxer() ff_parameters_to_context_demuxer() do you agree to add such function ? (iam asking as changes to AVCodecParameters API tend to receive a lot of opposition) it might also be possible to sqeeze the delay setting in elsewhere but that doesnt feel robust to me as it belongs to operation of avcodec_parameters_to_context() if i hear nothing ill apply the patch as you said "Its probably fine to set it, ..." [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In fact, the RIAA has been known to suggest that students drop out of college or go to community college in order to be able to afford settlements. -- The RIAA
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel