Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
88345052
Commit
88345052
authored
Jul 10, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed memory leak of 1 audio(video?) buffer when quitting.
parent
14cc9765
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
src/input/decoder.c
src/input/decoder.c
+17
-15
No files found.
src/input/decoder.c
View file @
88345052
...
@@ -625,9 +625,13 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
...
@@ -625,9 +625,13 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
while
(
(
p_aout_buf
=
p_dec
->
pf_decode_audio
(
p_dec
,
&
p_block
))
)
while
(
(
p_aout_buf
=
p_dec
->
pf_decode_audio
(
p_dec
,
&
p_block
))
)
{
{
aout_instance_t
*
p_aout
=
p_dec
->
p_owner
->
p_aout
;
aout_input_t
*
p_aout_input
=
p_dec
->
p_owner
->
p_aout_input
;
if
(
p_dec
->
b_die
)
if
(
p_dec
->
b_die
)
{
{
/* It prevent freezing VLC in case of broken decoder */
/* It prevent freezing VLC in case of broken decoder */
aout_DecDeleteBuffer
(
p_aout
,
p_aout_input
,
p_aout_buf
);
if
(
p_block
)
if
(
p_block
)
block_Release
(
p_block
);
block_Release
(
p_block
);
break
;
break
;
...
@@ -638,8 +642,7 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
...
@@ -638,8 +642,7 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
if
(
p_aout_buf
->
start_date
<
p_dec
->
p_owner
->
i_preroll_end
)
if
(
p_aout_buf
->
start_date
<
p_dec
->
p_owner
->
i_preroll_end
)
{
{
aout_DecDeleteBuffer
(
p_dec
->
p_owner
->
p_aout
,
aout_DecDeleteBuffer
(
p_aout
,
p_aout_input
,
p_aout_buf
);
p_dec
->
p_owner
->
p_aout_input
,
p_aout_buf
);
continue
;
continue
;
}
}
...
@@ -649,9 +652,7 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
...
@@ -649,9 +652,7 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
msg_Dbg
(
p_dec
,
"End of audio preroll"
);
msg_Dbg
(
p_dec
,
"End of audio preroll"
);
p_dec
->
p_owner
->
i_preroll_end
=
-
1
;
p_dec
->
p_owner
->
i_preroll_end
=
-
1
;
}
}
aout_DecPlay
(
p_dec
->
p_owner
->
p_aout
,
aout_DecPlay
(
p_aout
,
p_aout_input
,
p_aout_buf
,
i_rate
);
p_dec
->
p_owner
->
p_aout_input
,
p_aout_buf
,
i_rate
);
}
}
}
}
static
void
DecoderGetCc
(
decoder_t
*
p_dec
,
decoder_t
*
p_dec_cc
)
static
void
DecoderGetCc
(
decoder_t
*
p_dec
,
decoder_t
*
p_dec_cc
)
...
@@ -836,9 +837,11 @@ static void DecoderDecodeVideo( decoder_t *p_dec, block_t *p_block )
...
@@ -836,9 +837,11 @@ static void DecoderDecodeVideo( decoder_t *p_dec, block_t *p_block )
while
(
(
p_pic
=
p_dec
->
pf_decode_video
(
p_dec
,
&
p_block
))
)
while
(
(
p_pic
=
p_dec
->
pf_decode_video
(
p_dec
,
&
p_block
))
)
{
{
vout_thread_t
*
p_vout
=
p_dec
->
p_owner
->
p_vout
;
if
(
p_dec
->
b_die
)
if
(
p_dec
->
b_die
)
{
{
/* It prevent freezing VLC in case of broken decoder */
/* It prevent freezing VLC in case of broken decoder */
VoutDisplayedPicture
(
p_vout
,
p_pic
);
if
(
p_block
)
if
(
p_block
)
block_Release
(
p_block
);
block_Release
(
p_block
);
break
;
break
;
...
@@ -850,15 +853,15 @@ static void DecoderDecodeVideo( decoder_t *p_dec, block_t *p_block )
...
@@ -850,15 +853,15 @@ static void DecoderDecodeVideo( decoder_t *p_dec, block_t *p_block )
if
(
p_pic
->
date
<
p_dec
->
p_owner
->
i_preroll_end
)
if
(
p_pic
->
date
<
p_dec
->
p_owner
->
i_preroll_end
)
{
{
VoutDisplayedPicture
(
p_
dec
->
p_owner
->
p_
vout
,
p_pic
);
VoutDisplayedPicture
(
p_vout
,
p_pic
);
continue
;
continue
;
}
}
if
(
p_dec
->
p_owner
->
i_preroll_end
>
0
)
if
(
p_dec
->
p_owner
->
i_preroll_end
>
0
)
{
{
msg_Dbg
(
p_dec
,
"End of video preroll"
);
msg_Dbg
(
p_dec
,
"End of video preroll"
);
if
(
p_
dec
->
p_owner
->
p_
vout
)
if
(
p_vout
)
VoutFlushPicture
(
p_
dec
->
p_owner
->
p_
vout
);
VoutFlushPicture
(
p_vout
);
/* */
/* */
p_dec
->
p_owner
->
i_preroll_end
=
-
1
;
p_dec
->
p_owner
->
i_preroll_end
=
-
1
;
}
}
...
@@ -866,12 +869,11 @@ static void DecoderDecodeVideo( decoder_t *p_dec, block_t *p_block )
...
@@ -866,12 +869,11 @@ static void DecoderDecodeVideo( decoder_t *p_dec, block_t *p_block )
if
(
(
!
p_dec
->
p_owner
->
p_packetizer
||
!
p_dec
->
p_owner
->
p_packetizer
->
pf_get_cc
)
&&
p_dec
->
pf_get_cc
)
if
(
(
!
p_dec
->
p_owner
->
p_packetizer
||
!
p_dec
->
p_owner
->
p_packetizer
->
pf_get_cc
)
&&
p_dec
->
pf_get_cc
)
DecoderGetCc
(
p_dec
,
p_dec
);
DecoderGetCc
(
p_dec
,
p_dec
);
vout_DatePicture
(
p_dec
->
p_owner
->
p_vout
,
p_pic
,
vout_DatePicture
(
p_vout
,
p_pic
,
p_pic
->
date
);
p_pic
->
date
);
optimize_video_pts
(
p_dec
);
optimize_video_pts
(
p_dec
);
vout_DisplayPicture
(
p_
dec
->
p_owner
->
p_
vout
,
p_pic
);
vout_DisplayPicture
(
p_vout
,
p_pic
);
}
}
}
}
...
...
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