---
 ffmpeg.c   |   10 ++++------
 ffplay.c   |   15 +++++++--------
 ffserver.c |    6 ++----
 3 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 8c6b865..b4e378c 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1525,7 +1525,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;
@@ -1552,7 +1552,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;
@@ -1572,7 +1572,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;
                 }
@@ -1580,7 +1580,7 @@ static int output_packet(InputStream *ist, int ist_index,
                 avpkt.size = 0;
                 break;
             default:
-                goto fail_decode;
+                return ret;
             }
         } else {
             switch(ist->st->codec->codec_type) {
@@ -1852,8 +1852,6 @@ static int output_packet(InputStream *ist, int ist_index,
     }
 
     return 0;
- fail_decode:
-    return -1;
 }
 
 static void print_sdp(AVFormatContext **avc, int n)
diff --git a/ffplay.c b/ffplay.c
index 1a2ccfe..53d5929 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1708,10 +1708,10 @@ static int configure_video_filters(AVFilterGraph 
*graph, VideoState *is, const c
 
     if ((ret = avfilter_graph_create_filter(&filt_src, &input_filter, "src",
                                             NULL, is, graph)) < 0)
-        goto the_end;
+        return ret;
     if ((ret = avfilter_graph_create_filter(&filt_out, &ffsink, "out",
                                             NULL, &ffsink_ctx, graph)) < 0)
-        goto the_end;
+        return ret;
 
     if(vfilters) {
         AVFilterInOut *outputs = av_malloc(sizeof(AVFilterInOut));
@@ -1728,18 +1728,18 @@ static int configure_video_filters(AVFilterGraph 
*graph, VideoState *is, const c
         inputs->next    = NULL;
 
         if ((ret = avfilter_graph_parse(graph, vfilters, inputs, outputs, 
NULL)) < 0)
-            goto the_end;
+            return ret;
         av_freep(&vfilters);
     } else {
         if ((ret = avfilter_link(filt_src, 0, filt_out, 0)) < 0)
-            goto the_end;
+            return ret;
     }
 
     if ((ret = avfilter_graph_config(graph, NULL)) < 0)
-        goto the_end;
+        return ret;
 
     is->out_video_filter = filt_out;
-the_end:
+
     return ret;
 }
 
@@ -1849,7 +1849,7 @@ static int subtitle_thread(void *arg)
         SDL_UnlockMutex(is->subpq_mutex);
 
         if (is->subtitleq.abort_request)
-            goto the_end;
+            return 0;
 
         sp = &is->subpq[is->subpq_windex];
 
@@ -1886,7 +1886,6 @@ static int subtitle_thread(void *arg)
         }
         av_free_packet(pkt);
     }
- the_end:
     return 0;
 }
 
diff --git a/ffserver.c b/ffserver.c
index b467a22..4ad5d62 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -3507,7 +3507,7 @@ static int add_av_stream(FFStream *feed, AVStream *st)
             case AVMEDIA_TYPE_AUDIO:
                 if (av1->channels == av->channels &&
                     av1->sample_rate == av->sample_rate)
-                    goto found;
+                    return i;
                 break;
             case AVMEDIA_TYPE_VIDEO:
                 if (av1->width == av->width &&
@@ -3515,7 +3515,7 @@ static int add_av_stream(FFStream *feed, AVStream *st)
                     av1->time_base.den == av->time_base.den &&
                     av1->time_base.num == av->time_base.num &&
                     av1->gop_size == av->gop_size)
-                    goto found;
+                    return i;
                 break;
             default:
                 abort();
@@ -3527,8 +3527,6 @@ static int add_av_stream(FFStream *feed, AVStream *st)
     if (!fst)
         return -1;
     return feed->nb_streams - 1;
- found:
-    return i;
 }
 
 static void remove_stream(FFStream *stream)
-- 
1.7.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to