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
2d059d8d
Commit
2d059d8d
authored
Oct 18, 2013
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: factor out picture freeing code
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
060c42bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
ffplay.c
ffplay.c
+11
-10
No files found.
ffplay.c
View file @
2d059d8d
...
...
@@ -785,6 +785,14 @@ static void blend_subrect(AVPicture *dst, const AVSubtitleRect *rect, int imgw,
}
}
static
void
free_picture
(
VideoPicture
*
vp
)
{
if
(
vp
->
bmp
)
{
SDL_FreeYUVOverlay
(
vp
->
bmp
);
vp
->
bmp
=
NULL
;
}
}
static
void
free_subpicture
(
SubPicture
*
sp
)
{
avsubtitle_free
(
&
sp
->
sub
);
...
...
@@ -1013,7 +1021,6 @@ static void video_audio_display(VideoState *s)
static
void
stream_close
(
VideoState
*
is
)
{
VideoPicture
*
vp
;
int
i
;
/* XXX: use a special url_shutdown call to abort parse cleanly */
is
->
abort_request
=
1
;
...
...
@@ -1023,13 +1030,8 @@ static void stream_close(VideoState *is)
packet_queue_destroy
(
&
is
->
subtitleq
);
/* free all pictures */
for
(
i
=
0
;
i
<
VIDEO_PICTURE_QUEUE_SIZE
;
i
++
)
{
vp
=
&
is
->
pictq
[
i
];
if
(
vp
->
bmp
)
{
SDL_FreeYUVOverlay
(
vp
->
bmp
);
vp
->
bmp
=
NULL
;
}
}
for
(
i
=
0
;
i
<
VIDEO_PICTURE_QUEUE_SIZE
;
i
++
)
free_picture
(
&
is
->
pictq
[
i
]);
for
(
i
=
0
;
i
<
SUBPICTURE_QUEUE_SIZE
;
i
++
)
free_subpicture
(
&
is
->
subpq
[
i
]);
SDL_DestroyMutex
(
is
->
pictq_mutex
);
...
...
@@ -1505,8 +1507,7 @@ static void alloc_picture(VideoState *is)
vp
=
&
is
->
pictq
[
is
->
pictq_windex
];
if
(
vp
->
bmp
)
SDL_FreeYUVOverlay
(
vp
->
bmp
);
free_picture
(
vp
);
video_open
(
is
,
0
,
vp
);
...
...
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