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
5dacf7b1
Commit
5dacf7b1
authored
Apr 01, 2013
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: fix indentation
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
0b24e341
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
25 deletions
+24
-25
ffplay.c
ffplay.c
+24
-25
No files found.
ffplay.c
View file @
5dacf7b1
...
...
@@ -2175,34 +2175,33 @@ static int audio_decode_frame(VideoState *is)
return
-
1
;
if
(
!
is
->
audio_buf_frames_pending
)
{
if
(
flush_complete
)
break
;
new_packet
=
0
;
len1
=
avcodec_decode_audio4
(
dec
,
is
->
frame
,
&
got_frame
,
pkt_temp
);
if
(
len1
<
0
)
{
/* if error, we skip the frame */
pkt_temp
->
size
=
0
;
break
;
}
if
(
flush_complete
)
break
;
new_packet
=
0
;
len1
=
avcodec_decode_audio4
(
dec
,
is
->
frame
,
&
got_frame
,
pkt_temp
);
if
(
len1
<
0
)
{
/* if error, we skip the frame */
pkt_temp
->
size
=
0
;
break
;
}
pkt_temp
->
data
+=
len1
;
pkt_temp
->
size
-=
len1
;
pkt_temp
->
data
+=
len1
;
pkt_temp
->
size
-=
len1
;
if
(
!
got_frame
)
{
/* stop sending empty packets if the decoder is finished */
if
(
!
pkt_temp
->
data
&&
dec
->
codec
->
capabilities
&
CODEC_CAP_DELAY
)
flush_complete
=
1
;
continue
;
}
if
(
!
got_frame
)
{
/* stop sending empty packets if the decoder is finished */
if
(
!
pkt_temp
->
data
&&
dec
->
codec
->
capabilities
&
CODEC_CAP_DELAY
)
flush_complete
=
1
;
continue
;
}
tb
=
(
AVRational
){
1
,
is
->
frame
->
sample_rate
};
if
(
is
->
frame
->
pts
!=
AV_NOPTS_VALUE
)
is
->
frame
->
pts
=
av_rescale_q
(
is
->
frame
->
pts
,
dec
->
time_base
,
tb
);
if
(
is
->
frame
->
pts
==
AV_NOPTS_VALUE
&&
pkt_temp
->
pts
!=
AV_NOPTS_VALUE
)
is
->
frame
->
pts
=
av_rescale_q
(
pkt_temp
->
pts
,
is
->
audio_st
->
time_base
,
tb
);
if
(
pkt_temp
->
pts
!=
AV_NOPTS_VALUE
)
pkt_temp
->
pts
+=
(
double
)
is
->
frame
->
nb_samples
/
is
->
frame
->
sample_rate
/
av_q2d
(
is
->
audio_st
->
time_base
);
tb
=
(
AVRational
){
1
,
is
->
frame
->
sample_rate
};
if
(
is
->
frame
->
pts
!=
AV_NOPTS_VALUE
)
is
->
frame
->
pts
=
av_rescale_q
(
is
->
frame
->
pts
,
dec
->
time_base
,
tb
);
if
(
is
->
frame
->
pts
==
AV_NOPTS_VALUE
&&
pkt_temp
->
pts
!=
AV_NOPTS_VALUE
)
is
->
frame
->
pts
=
av_rescale_q
(
pkt_temp
->
pts
,
is
->
audio_st
->
time_base
,
tb
);
if
(
pkt_temp
->
pts
!=
AV_NOPTS_VALUE
)
pkt_temp
->
pts
+=
(
double
)
is
->
frame
->
nb_samples
/
is
->
frame
->
sample_rate
/
av_q2d
(
is
->
audio_st
->
time_base
);
#if CONFIG_AVFILTER
dec_channel_layout
=
get_valid_channel_layout
(
is
->
frame
->
channel_layout
,
av_frame_get_channels
(
is
->
frame
));
...
...
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