aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-30 19:03:31 +0100
committerMax Kellermann <max@duempel.org>2008-10-30 19:03:31 +0100
commit130fc58b367001173f5affb7c606f073bf0b2513 (patch)
tree9d728494a9d18f2877220bea16b03b0bcfe63017 /src/decoder
parent5f1df0a9273e62f6e6e4449b49f50ae010e64db2 (diff)
downloadmpd-130fc58b367001173f5affb7c606f073bf0b2513.tar.gz
mpd-130fc58b367001173f5affb7c606f073bf0b2513.tar.xz
mpd-130fc58b367001173f5affb7c606f073bf0b2513.zip
ffmpeg: break immediately after av_read_frame()
Remove one indent level.
Diffstat (limited to '')
-rw-r--r--src/decoder/ffmpeg_plugin.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c
index 327623ee7..30b469c22 100644
--- a/src/decoder/ffmpeg_plugin.c
+++ b/src/decoder/ffmpeg_plugin.c
@@ -280,16 +280,15 @@ ffmpeg_decode_internal(BasePtrs *base)
decoder_command_finished(decoder);
}
- if (av_read_frame(pFormatCtx, &packet) >= 0) {
- if (packet.stream_index == base->audioStream)
- ffmpeg_send_packet(decoder, &packet, aCodecCtx,
- &pFormatCtx->streams[base->audioStream]->time_base);
-
- av_free_packet(&packet);
- } else {
- //end of file
+ if (av_read_frame(pFormatCtx, &packet) < 0)
+ /* end of file */
break;
- }
+
+ if (packet.stream_index == base->audioStream)
+ ffmpeg_send_packet(decoder, &packet, aCodecCtx,
+ &pFormatCtx->streams[base->audioStream]->time_base);
+
+ av_free_packet(&packet);
} while (decoder_get_command(decoder) != DECODE_COMMAND_STOP);
return true;