From 130fc58b367001173f5affb7c606f073bf0b2513 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Thu, 30 Oct 2008 19:03:31 +0100
Subject: ffmpeg: break immediately after av_read_frame()

Remove one indent level.
---
 src/decoder/ffmpeg_plugin.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

(limited to 'src/decoder')

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;
-- 
cgit v1.2.3