aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-15 21:14:53 +0200
committerMax Kellermann <max@duempel.org>2011-09-15 21:14:53 +0200
commit5aabee89967cf367e4128eedd60c8916459042c7 (patch)
tree668875fb4de58aaab6ce6ec43abf587d8e4603e2
parent48a84ca23ef40b87056214ea03b5f141a4ed54c4 (diff)
downloadmpd-5aabee89967cf367e4128eedd60c8916459042c7.tar.gz
mpd-5aabee89967cf367e4128eedd60c8916459042c7.tar.xz
mpd-5aabee89967cf367e4128eedd60c8916459042c7.zip
decoder/ffmpeg: add local variable "av_stream"
Code simplification.
Diffstat (limited to '')
-rw-r--r--src/decoder/ffmpeg_decoder_plugin.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c
index 70628df9d..9e8f2c00d 100644
--- a/src/decoder/ffmpeg_decoder_plugin.c
+++ b/src/decoder/ffmpeg_decoder_plugin.c
@@ -375,8 +375,9 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
return;
}
- AVCodecContext *codec_context =
- format_context->streams[audio_stream]->codec;
+ AVStream *av_stream = format_context->streams[audio_stream];
+
+ AVCodecContext *codec_context = av_stream->codec;
if (codec_context->codec_name[0] != 0)
g_debug("codec '%s'", codec_context->codec_name);
@@ -427,7 +428,7 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
if (packet.stream_index == audio_stream)
cmd = ffmpeg_send_packet(decoder, input,
&packet, codec_context,
- &format_context->streams[audio_stream]->time_base);
+ &av_stream->time_base);
else
cmd = decoder_get_command(decoder);