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
40693ba3
Commit
40693ba3
authored
Apr 15, 2013
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: simplify aspect ratio calculation
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
0dd25e46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
ffplay.c
ffplay.c
+2
-5
No files found.
ffplay.c
View file @
40693ba3
...
...
@@ -1556,11 +1556,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t
vp
=
&
is
->
pictq
[
is
->
pictq_windex
];
#if CONFIG_AVFILTER
vp
->
sar
=
src_frame
->
sample_aspect_ratio
;
#else
vp
->
sar
=
av_guess_sample_aspect_ratio
(
is
->
ic
,
is
->
video_st
,
src_frame
);
#endif
/* alloc or resize hardware picture buffer */
if
(
!
vp
->
bmp
||
vp
->
reallocate
||
!
vp
->
allocated
||
...
...
@@ -1688,6 +1684,8 @@ static int get_video_frame(VideoState *is, AVFrame *frame, AVPacket *pkt, int *s
frame
->
pts
=
0
;
}
frame
->
sample_aspect_ratio
=
av_guess_sample_aspect_ratio
(
is
->
ic
,
is
->
video_st
,
frame
);
if
(
framedrop
>
0
||
(
framedrop
&&
get_master_sync_type
(
is
)
!=
AV_SYNC_VIDEO_MASTER
))
{
SDL_LockMutex
(
is
->
pictq_mutex
);
if
(
is
->
frame_last_pts
!=
AV_NOPTS_VALUE
&&
frame
->
pts
)
{
...
...
@@ -1937,7 +1935,6 @@ static int video_thread(void *arg)
last_serial
=
serial
;
}
frame
->
sample_aspect_ratio
=
av_guess_sample_aspect_ratio
(
is
->
ic
,
is
->
video_st
,
frame
);
ret
=
av_buffersrc_add_frame
(
filt_in
,
frame
);
if
(
ret
<
0
)
goto
the_end
;
...
...
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