af_lavcac3enc: fix for lavc AC-3 encoder change to float input
commitc24d4e9ec29cb05d2e5ac557d9a0ed89280151c6
authorUoti Urpala <uau@glyph.nonexistent.invalid>
Thu, 3 Feb 2011 02:55:20 +0000 (3 04:55 +0200)
committerUoti Urpala <uau@glyph.nonexistent.invalid>
Thu, 3 Feb 2011 02:55:20 +0000 (3 04:55 +0200)
treefc95bb67bef8bb4c50f46aee0d7c8e136afa33de
parent0cb63ea722b4677808f3518b0baec3998874e1a9
af_lavcac3enc: fix for lavc AC-3 encoder change to float input

The libavcodec AC-3 encoder was changed to use floats, and take
floating point samples as input (the fixed-point version is still
available under the new name "ac3_fixed"). This broke af_lavcac3enc
because it blindly assumed without checking that the "ac3" encoder
would take signed 16-bit integer samples. Improve af_lavcac3enc so
that it checks the sample formats supported by the encoder and can
handle either int16_t or float.

Perhaps an option to keep using integer input but instead switch the
encoder name to "ac3_fixed" for new libavcodec versions would have
some value. Then again, maybe not. Using the preferred data format of
the default "ac3" encoder should normally be best, so probably better
not add such an option unless real need appears.
libaf/af_lavcac3enc.c