summaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-07-11 16:32:54 +0200
committerDiego Biurrun <diego@biurrun.de>2011-07-13 17:53:49 +0200
commit71a1d1116fd952f348d732c19ba7f4ebe041ce26 (patch)
tree33dde87b6763e9b3b5cdbfe5462ac752e01431fb /ffmpeg.c
parent191c5f8ff33eb995b6dbc5b11af7c1a79f8381f0 (diff)
downloadffmpeg-streaming-71a1d1116fd952f348d732c19ba7f4ebe041ce26.zip
ffmpeg-streaming-71a1d1116fd952f348d732c19ba7f4ebe041ce26.tar.gz
Replace some gotos that lead to single return statements by direct return.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 1f339cb..ccf9c62 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1522,7 +1522,7 @@ static int output_packet(InputStream *ist, int ist_index,
ret = avcodec_decode_audio3(ist->st->codec, samples, &decoded_data_size,
&avpkt);
if (ret < 0)
- goto fail_decode;
+ return ret;
avpkt.data += ret;
avpkt.size -= ret;
data_size = ret;
@@ -1549,7 +1549,7 @@ static int output_packet(InputStream *ist, int ist_index,
&picture, &got_output, &avpkt);
quality = same_quality ? picture.quality : 0;
if (ret < 0)
- goto fail_decode;
+ return ret;
if (!got_output) {
/* no picture yet */
goto discard_packet;
@@ -1569,7 +1569,7 @@ static int output_packet(InputStream *ist, int ist_index,
ret = avcodec_decode_subtitle2(ist->st->codec,
&subtitle, &got_output, &avpkt);
if (ret < 0)
- goto fail_decode;
+ return ret;
if (!got_output) {
goto discard_packet;
}
@@ -1577,7 +1577,7 @@ static int output_packet(InputStream *ist, int ist_index,
avpkt.size = 0;
break;
default:
- goto fail_decode;
+ return -1;
}
} else {
switch(ist->st->codec->codec_type) {
@@ -1849,8 +1849,6 @@ static int output_packet(InputStream *ist, int ist_index,
}
return 0;
- fail_decode:
- return -1;
}
static void print_sdp(AVFormatContext **avc, int n)
OpenPOWER on IntegriCloud