[FFmpeg-cvslog] r18667 - trunk/libavcodec/wavpack.c

Kostya kostya.shishkov
Thu Apr 23 20:45:45 CEST 2009


On Thu, Apr 23, 2009 at 08:00:34PM +0200, Laurent Aimar wrote:
> Hi,
> 
>  Why not using (s->frame_flags&0x03) to dynamically set the output
> format (avctx->sample_fmt) ?
>  This way, a user app will automatically have the right sample size and will
> not have to fill bits_per_coded_sample (which is kind of undocumented and
> I have no idea how to fill it right except by always setting 32 here).

It is set by lavf demuxer as ((frame_flags&3)+1)<<3 from the first block.
And I'm a bit suspicious about setting it dynamically.
Sane alternative variant is setting avctx->sample_fmt in demuxer instead of
codec itself (for future float support as well).
 
> Regards,
> 
> -- 
> fenrir



More information about the ffmpeg-cvslog mailing list