Hi, On Sat, Apr 23, 2011 at 8:10 AM, Diego Biurrun <[email protected]> wrote: > On Sat, Apr 23, 2011 at 08:03:17AM -0400, Ronald S. Bultje wrote: >> >> On Sat, Apr 23, 2011 at 7:24 AM, Diego Biurrun <[email protected]> wrote: >> > Something like this at the top of the file (note that the names could >> > likely be improved): >> > >> > #if CONFIG_AUDIO_FLOAT >> > #define AV_SAMPLE_FMT_NATIVE AV_SAMPLE_FMT_FLT >> > #else >> > #define AV_SAMPLE_FMT_NATIVE AV_SAMPLE_FMT_S16 >> > #endif >> > >> > and then the above ugly block just reads >> > >> > avctx->sample_fmt = AV_SAMPLE_FMT_NATIVE; >> > >> > Since at least the AV_SAMPLE_FMT thing is used in multiple places >> > within each file, this should even save some lines. Also, I think >> > both AAC and AC-3 used the same formats, probably more codecs do, >> > so this could be placed in a common header, saving even more >> > #ifdeffery... >> >> As Benjamin said, this makes the future step of removing codepaths >> easier. Instead of removing 5 and adding 1, we simply remove 4 and >> keep 1. (That happens when audioconvert is finally sane and we output >> planar audio.) > > I'll believe it when I see it, no earlier. You all know that nothing > lasts quite as long as a temporary solution. > > Also, there is no need to make a future removal of these ugly crutches > easier than it already is. It's a five minute job to run a search and > replace on this handful of files, absolutely no rocket science involved.
Fine with me either way really, I'll leave it up to Justin to do as he prefers. :-). Ronald _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
