Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
71a1d111
Commit
71a1d111
authored
Jul 11, 2011
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace some gotos that lead to single return statements by direct return.
parent
191c5f8f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
18 deletions
+13
-18
ffmpeg.c
ffmpeg.c
+4
-6
ffplay.c
ffplay.c
+7
-8
ffserver.c
ffserver.c
+2
-4
No files found.
ffmpeg.c
View file @
71a1d111
...
...
@@ -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
)
...
...
ffplay.c
View file @
71a1d111
...
...
@@ -1709,10 +1709,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
));
...
...
@@ -1729,18 +1729,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
;
}
...
...
@@ -1850,7 +1850,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
];
...
...
@@ -1887,7 +1887,6 @@ static int subtitle_thread(void *arg)
}
av_free_packet
(
pkt
);
}
the_end:
return
0
;
}
...
...
ffserver.c
View file @
71a1d111
...
...
@@ -3508,7 +3508,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
&&
...
...
@@ -3516,7 +3516,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
();
...
...
@@ -3528,8 +3528,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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment