summaryrefslogtreecommitdiff
path: root/libavcodec/pcm-bluray.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-31 13:47:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-31 13:47:04 +0200
commitb043d80be4d8d1a5d16f3e864ebff3a4bbe9c509 (patch)
treefd0c38d2dfc62413d263e7f9a11b903eda24dddb /libavcodec/pcm-bluray.c
parent4273236e2f6366e8a8ed7349cd6ac4c2f9e9863e (diff)
parent21fd2f84ce21f8e03d0287a759cdcc5a5ea1d0a8 (diff)
downloadffmpeg-b043d80be4d8d1a5d16f3e864ebff3a4bbe9c509.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: pcm_bluray: cosmetics Conflicts: libavcodec/pcm-bluray.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pcm-bluray.c')
-rw-r--r--libavcodec/pcm-bluray.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/libavcodec/pcm-bluray.c b/libavcodec/pcm-bluray.c
index 804b7b1181..db458d0c1c 100644
--- a/libavcodec/pcm-bluray.c
+++ b/libavcodec/pcm-bluray.c
@@ -46,7 +46,7 @@
*/
/**
- * Parse the header of a LPCM frame read from a MPEG-TS stream
+ * Parse the header of a LPCM frame read from a Blu-ray MPEG-TS stream
* @param avctx the codec context
* @param header pointer to the first four bytes of the data packet
*/
@@ -56,8 +56,9 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx,
static const uint8_t bits_per_samples[4] = { 0, 16, 20, 24 };
static const uint32_t channel_layouts[16] = {
0, AV_CH_LAYOUT_MONO, 0, AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_SURROUND,
- AV_CH_LAYOUT_2_1, AV_CH_LAYOUT_4POINT0, AV_CH_LAYOUT_2_2, AV_CH_LAYOUT_5POINT0,
- AV_CH_LAYOUT_5POINT1, AV_CH_LAYOUT_7POINT0, AV_CH_LAYOUT_7POINT1, 0, 0, 0, 0
+ AV_CH_LAYOUT_2_1, AV_CH_LAYOUT_4POINT0, AV_CH_LAYOUT_2_2,
+ AV_CH_LAYOUT_5POINT0, AV_CH_LAYOUT_5POINT1, AV_CH_LAYOUT_7POINT0,
+ AV_CH_LAYOUT_7POINT1, 0, 0, 0, 0
};
static const uint8_t channels[16] = {
0, 1, 0, 2, 3, 3, 4, 4, 5, 6, 7, 8, 0, 0, 0, 0
@@ -74,8 +75,8 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx,
av_log(avctx, AV_LOG_ERROR, "unsupported sample depth (%d)\n", avctx->bits_per_coded_sample);
return AVERROR_INVALIDDATA;
}
- avctx->sample_fmt = avctx->bits_per_coded_sample == 16 ? AV_SAMPLE_FMT_S16 :
- AV_SAMPLE_FMT_S32;
+ avctx->sample_fmt = avctx->bits_per_coded_sample == 16 ? AV_SAMPLE_FMT_S16
+ : AV_SAMPLE_FMT_S32;
if (avctx->sample_fmt == AV_SAMPLE_FMT_S32)
avctx->bits_per_raw_sample = avctx->bits_per_coded_sample;
@@ -148,7 +149,8 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data,
/* There's always an even number of channels in the source */
num_source_channels = FFALIGN(avctx->channels, 2);
- sample_size = (num_source_channels * (avctx->sample_fmt == AV_SAMPLE_FMT_S16 ? 16 : 24)) >> 3;
+ sample_size = (num_source_channels *
+ (avctx->sample_fmt == AV_SAMPLE_FMT_S16 ? 16 : 24)) >> 3;
samples = buf_size / sample_size;
/* get output buffer */