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
e8547647
Commit
e8547647
authored
Mar 15, 2017
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
915bb788
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
35 deletions
+35
-35
ffplay.c
ffplay.c
+35
-35
No files found.
ffplay.c
View file @
e8547647
...
...
@@ -560,44 +560,44 @@ static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) {
AVPacket
pkt
;
if
(
d
->
queue
->
serial
==
d
->
pkt_serial
)
{
do
{
if
(
d
->
queue
->
abort_request
)
return
-
1
;
do
{
if
(
d
->
queue
->
abort_request
)
return
-
1
;
switch
(
d
->
avctx
->
codec_type
)
{
case
AVMEDIA_TYPE_VIDEO
:
ret
=
avcodec_receive_frame
(
d
->
avctx
,
frame
);
if
(
ret
>=
0
)
{
if
(
decoder_reorder_pts
==
-
1
)
{
frame
->
pts
=
av_frame_get_best_effort_timestamp
(
frame
);
}
else
if
(
!
decoder_reorder_pts
)
{
frame
->
pts
=
frame
->
pkt_dts
;
}
switch
(
d
->
avctx
->
codec_type
)
{
case
AVMEDIA_TYPE_VIDEO
:
ret
=
avcodec_receive_frame
(
d
->
avctx
,
frame
);
if
(
ret
>=
0
)
{
if
(
decoder_reorder_pts
==
-
1
)
{
frame
->
pts
=
av_frame_get_best_effort_timestamp
(
frame
);
}
else
if
(
!
decoder_reorder_pts
)
{
frame
->
pts
=
frame
->
pkt_dts
;
}
}
break
;
case
AVMEDIA_TYPE_AUDIO
:
ret
=
avcodec_receive_frame
(
d
->
avctx
,
frame
);
if
(
ret
>=
0
)
{
AVRational
tb
=
(
AVRational
){
1
,
frame
->
sample_rate
};
if
(
frame
->
pts
!=
AV_NOPTS_VALUE
)
frame
->
pts
=
av_rescale_q
(
frame
->
pts
,
av_codec_get_pkt_timebase
(
d
->
avctx
),
tb
);
else
if
(
d
->
next_pts
!=
AV_NOPTS_VALUE
)
frame
->
pts
=
av_rescale_q
(
d
->
next_pts
,
d
->
next_pts_tb
,
tb
);
if
(
frame
->
pts
!=
AV_NOPTS_VALUE
)
{
d
->
next_pts
=
frame
->
pts
+
frame
->
nb_samples
;
d
->
next_pts_tb
=
tb
;
}
}
break
;
}
break
;
case
AVMEDIA_TYPE_AUDIO
:
ret
=
avcodec_receive_frame
(
d
->
avctx
,
frame
);
if
(
ret
>=
0
)
{
AVRational
tb
=
(
AVRational
){
1
,
frame
->
sample_rate
};
if
(
frame
->
pts
!=
AV_NOPTS_VALUE
)
frame
->
pts
=
av_rescale_q
(
frame
->
pts
,
av_codec_get_pkt_timebase
(
d
->
avctx
),
tb
);
else
if
(
d
->
next_pts
!=
AV_NOPTS_VALUE
)
frame
->
pts
=
av_rescale_q
(
d
->
next_pts
,
d
->
next_pts_tb
,
tb
);
if
(
frame
->
pts
!=
AV_NOPTS_VALUE
)
{
d
->
next_pts
=
frame
->
pts
+
frame
->
nb_samples
;
d
->
next_pts_tb
=
tb
;
}
if
(
ret
==
AVERROR_EOF
)
{
d
->
finished
=
d
->
pkt_serial
;
avcodec_flush_buffers
(
d
->
avctx
);
return
0
;
}
break
;
}
if
(
ret
==
AVERROR_EOF
)
{
d
->
finished
=
d
->
pkt_serial
;
avcodec_flush_buffers
(
d
->
avctx
);
return
0
;
}
if
(
ret
>=
0
)
return
1
;
}
while
(
ret
!=
AVERROR
(
EAGAIN
));
if
(
ret
>=
0
)
return
1
;
}
while
(
ret
!=
AVERROR
(
EAGAIN
));
}
do
{
...
...
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