[FFmpeg-devel] [RFC] lavc/ffmpeg sample_fmt implementation

Michael Niedermayer michaelni
Sat Aug 2 20:43:35 CEST 2008


On Sat, Aug 02, 2008 at 03:09:55PM +1000, pross at xvid.org wrote:
> On Fri, Aug 01, 2008 at 09:31:20PM +0200, Michael Niedermayer wrote:
> > On Sat, Aug 02, 2008 at 12:21:04AM +1000, pross at xvid.org wrote:
> > > On Thu, Jul 31, 2008 at 06:39:12PM +0200, Michael Niedermayer wrote:
> > > > On Fri, Aug 01, 2008 at 12:02:12AM +1000, pross at xvid.org wrote:
> > > > > On Wed, Jul 30, 2008 at 10:09:02PM +0200, Michael Niedermayer wrote:
> > > > > > On Mon, Jul 28, 2008 at 10:23:29PM +1000, pross at xvid.org wrote:
> > > > > > > On Sun, Jul 27, 2008 at 11:00:05PM +0200, Michael Niedermayer wrote:
> > > > > > > > On Sun, Jul 27, 2008 at 06:17:48PM +1000, pross at xvid.org wrote:
> > > > > > > > > On Sat, Jul 26, 2008 at 01:08:09AM +1000, pross at xvid.org wrote:
> > > > > > > > > > Hi.
> > > > > > > > > > 
> > > > > > > > > > This patch adds sample_fmt conversion support to lavc (and ffmpeg).
> > > > > > > > > 
> > > > > > > > > Round two patches enclosed.
> > > > > > > > > 
> > > > > > > 
> > > > > > > Round three.
> > > > > > > 
> > > 
> > > Round four. FFplay patch included as well.
> 
> > 
> > 
> > > Index: ffmpeg.c
> > > ===================================================================
> > > --- ffmpeg.c	(revision 14495)
> > > +++ ffmpeg.c	(working copy)
> > > @@ -257,6 +257,8 @@
> > >      /* audio only */
> > >      int audio_resample;
> > >      ReSampleContext *resample; /* for audio resampling */
> > 
> > > +    int audio_reformat;
> > > +    AVAudioConvert *reformat_ctx;
> > 
> > couldnt reformat_ctx!= NULL be used instead of audio_reformat ?
> 
> Agree.
> 
> > [...]
> > 
> > >  {
> > >      AVPacket *pkt = &is->audio_pkt;
> > > +    AVCodecContext *dec= is->audio_st->codec;
> > >      int n, len1, data_size;
> > >      double pts;
> > 
> > this and the related changes are ok but they are a seperate simplification and
> > should be commited seperately from the audioconvert stuff.
> 
> Yes.
> 
> I've been reminded that decoders, such as mlpdec, may not fully decide on the
> output sample_fmt until after AVCodec->init() call. The current FFmpeg patch
> does not handle this case. I've revised the patch, again.

patch looks ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080802/0783dea7/attachment.pgp>



More information about the ffmpeg-devel mailing list