summaryrefslogtreecommitdiffstats
path: root/libhb/encavcodecaudio.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-01-02 21:44:38 +0000
committerRodeo <[email protected]>2013-01-02 21:44:38 +0000
commita2a844aaf85c003320170d446adcdb14e05317cc (patch)
treea376b4ada55ddc3ffd91d8491a5e42ba165dde63 /libhb/encavcodecaudio.c
parent036e9b30ce75ebe78ad8c6e4ce5de7cf6c12777f (diff)
FLAC: add 24-bit encoding.
Works via a dedicated encoder: "FLAC (24-bit)", "ffflac24". Users who prefer 16-bit can use the previous FLAC encoder: "FLAC (ffmpeg)", "ffflac". git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5134 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/encavcodecaudio.c')
-rw-r--r--libhb/encavcodecaudio.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/libhb/encavcodecaudio.c b/libhb/encavcodecaudio.c
index db09e8a6f..669691dc1 100644
--- a/libhb/encavcodecaudio.c
+++ b/libhb/encavcodecaudio.c
@@ -91,14 +91,22 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job_t *job)
context->compression_level = audio->config.out.compression_level;
}
- // set the sample_fmt to something practical
- if (audio->config.out.codec == HB_ACODEC_FFFLAC)
+ // set the sample format and bit depth to something practical
+ switch (audio->config.out.codec)
{
- hb_ff_set_sample_fmt(context, codec, AV_SAMPLE_FMT_S16);
- }
- else
- {
- hb_ff_set_sample_fmt(context, codec, AV_SAMPLE_FMT_FLT);
+ case HB_ACODEC_FFFLAC:
+ hb_ff_set_sample_fmt(context, codec, AV_SAMPLE_FMT_S16);
+ context->bits_per_raw_sample = 16;
+ break;
+
+ case HB_ACODEC_FFFLAC24:
+ hb_ff_set_sample_fmt(context, codec, AV_SAMPLE_FMT_S32);
+ context->bits_per_raw_sample = 24;
+ break;
+
+ default:
+ hb_ff_set_sample_fmt(context, codec, AV_SAMPLE_FMT_FLTP);
+ break;
}
if (hb_avcodec_open(context, codec, &av_opts, 0))