aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/ffmpeg_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-07-19 18:18:32 +0200
committerMax Kellermann <max@duempel.org>2009-07-19 18:18:32 +0200
commitc9d43b4d713d508b6f5b67cfffba9296f9436934 (patch)
tree70100c28e365a244f5c6a361d2ecda332df2a756 /src/decoder/ffmpeg_plugin.c
parentc5ec035fb4a533ebd9f8c69b085604560d2a5487 (diff)
parent49ede85827c095d0a6ead0ecb63e83e000a76d4f (diff)
downloadmpd-c9d43b4d713d508b6f5b67cfffba9296f9436934.tar.gz
mpd-c9d43b4d713d508b6f5b67cfffba9296f9436934.tar.xz
mpd-c9d43b4d713d508b6f5b67cfffba9296f9436934.zip
Merge branch 'master' of git://git.infradead.org/users/dwmw2/mpd
Conflicts: Makefile.am
Diffstat (limited to 'src/decoder/ffmpeg_plugin.c')
-rw-r--r--src/decoder/ffmpeg_plugin.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c
index 03c46a732..f6003d2f3 100644
--- a/src/decoder/ffmpeg_plugin.c
+++ b/src/decoder/ffmpeg_plugin.c
@@ -267,6 +267,7 @@ ffmpeg_decode_internal(struct ffmpeg_context *ctx)
struct audio_format audio_format;
enum decoder_command cmd;
int total_time;
+ uint8_t bits;
total_time = 0;
@@ -275,13 +276,13 @@ ffmpeg_decode_internal(struct ffmpeg_context *ctx)
}
#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(41<<8)+0)
- audio_format.bits = (uint8_t) av_get_bits_per_sample_format(codec_context->sample_fmt);
+ bits = (uint8_t) av_get_bits_per_sample_format(codec_context->sample_fmt);
#else
/* XXX fixme 16-bit for older ffmpeg (13 Aug 2007) */
- audio_format.bits = (uint8_t) 16;
+ bits = (uint8_t) 16;
#endif
- audio_format.sample_rate = (unsigned int)codec_context->sample_rate;
- audio_format.channels = codec_context->channels;
+ audio_format_init(&audio_format, codec_context->sample_rate, bits,
+ codec_context->channels);
if (!audio_format_valid(&audio_format)) {
g_warning("Invalid audio format: %u:%u:%u\n",