Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
b380a994
Commit
b380a994
authored
Nov 05, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: who has seen that I have just forgot to release any buffers...
parent
c3b01ee0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
modules/codec/adpcm.c
modules/codec/adpcm.c
+4
-1
modules/codec/araw.c
modules/codec/araw.c
+5
-2
modules/codec/faad.c
modules/codec/faad.c
+8
-1
No files found.
modules/codec/adpcm.c
View file @
b380a994
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* adpcm.c : adpcm variant audio decoder
* adpcm.c : adpcm variant audio decoder
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* Copyright (C) 2001, 2002 VideoLAN
* $Id: adpcm.c,v 1.1
4 2003/11/04 14:51:51
fenrir Exp $
* $Id: adpcm.c,v 1.1
5 2003/11/05 01:47:40
fenrir Exp $
*
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
*
...
@@ -286,6 +286,7 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
...
@@ -286,6 +286,7 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
}
}
else
if
(
!
aout_DateGet
(
&
p_sys
->
date
)
)
else
if
(
!
aout_DateGet
(
&
p_sys
->
date
)
)
{
{
block_Release
(
p_block
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
i_pts
=
0
;
i_pts
=
0
;
...
@@ -296,6 +297,7 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
...
@@ -296,6 +297,7 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
if
(
out
==
NULL
)
if
(
out
==
NULL
)
{
{
msg_Err
(
p_dec
,
"cannot get aout buffer"
);
msg_Err
(
p_dec
,
"cannot get aout buffer"
);
block_Release
(
p_block
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
out
->
start_date
=
aout_DateGet
(
&
p_sys
->
date
);
out
->
start_date
=
aout_DateGet
(
&
p_sys
->
date
);
...
@@ -328,6 +330,7 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
...
@@ -328,6 +330,7 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
i_data
-=
p_sys
->
i_block
;
i_data
-=
p_sys
->
i_block
;
}
}
block_Release
(
p_block
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
modules/codec/araw.c
View file @
b380a994
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* araw.c: Pseudo audio decoder; for raw pcm data
* araw.c: Pseudo audio decoder; for raw pcm data
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001, 2003 VideoLAN
* Copyright (C) 2001, 2003 VideoLAN
* $Id: araw.c,v 1.2
1 2003/11/04 01:27:33
fenrir Exp $
* $Id: araw.c,v 1.2
2 2003/11/05 01:47:40
fenrir Exp $
*
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
*
...
@@ -217,7 +217,6 @@ static int DecoderInit( decoder_t *p_dec )
...
@@ -217,7 +217,6 @@ static int DecoderInit( decoder_t *p_dec )
{
{
msg_Err
(
p_dec
,
"bad samplerate"
);
msg_Err
(
p_dec
,
"bad samplerate"
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
p_sys
->
p_wf
=
p_wf
;
p_sys
->
p_wf
=
p_wf
;
...
@@ -364,6 +363,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
...
@@ -364,6 +363,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
}
}
if
(
i_size
<
p_sys
->
p_wf
->
nBlockAlign
)
if
(
i_size
<
p_sys
->
p_wf
->
nBlockAlign
)
{
{
block_Release
(
p_block
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
i_samples
=
i_size
/
(
(
p_sys
->
p_wf
->
wBitsPerSample
+
7
)
/
8
)
/
i_samples
=
i_size
/
(
(
p_sys
->
p_wf
->
wBitsPerSample
+
7
)
/
8
)
/
...
@@ -375,6 +375,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
...
@@ -375,6 +375,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
}
}
else
if
(
!
aout_DateGet
(
&
p_sys
->
date
)
)
else
if
(
!
aout_DateGet
(
&
p_sys
->
date
)
)
{
{
block_Release
(
p_block
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -387,6 +388,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
...
@@ -387,6 +388,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
if
(
out
==
NULL
)
if
(
out
==
NULL
)
{
{
msg_Err
(
p_dec
,
"cannot get aout buffer"
);
msg_Err
(
p_dec
,
"cannot get aout buffer"
);
block_Release
(
p_block
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
@@ -414,6 +416,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
...
@@ -414,6 +416,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
i_samples
-=
i_copy
;
i_samples
-=
i_copy
;
}
}
block_Release
(
p_block
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
modules/codec/faad.c
View file @
b380a994
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* decoder.c: AAC decoder using libfaad2
* decoder.c: AAC decoder using libfaad2
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001, 2003 VideoLAN
* Copyright (C) 2001, 2003 VideoLAN
* $Id: faad.c,v 1.
2 2003/11/04 02:23:11
fenrir Exp $
* $Id: faad.c,v 1.
3 2003/11/05 01:47:40
fenrir Exp $
*
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
*
...
@@ -195,6 +195,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
...
@@ -195,6 +195,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
p_sys
->
p_buffer
,
p_sys
->
i_buffer
,
p_sys
->
p_buffer
,
p_sys
->
i_buffer
,
&
i_rate
,
&
i_channels
)
<
0
)
&
i_rate
,
&
i_channels
)
<
0
)
{
{
block_Release
(
p_block
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
p_sys
->
output_format
.
i_rate
=
i_rate
;
p_sys
->
output_format
.
i_rate
=
i_rate
;
...
@@ -218,6 +219,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
...
@@ -218,6 +219,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
msg_Warn
(
p_dec
,
"%s"
,
faacDecGetErrorMessage
(
frame
.
error
)
);
msg_Warn
(
p_dec
,
"%s"
,
faacDecGetErrorMessage
(
frame
.
error
)
);
/* flush the buffer */
/* flush the buffer */
p_sys
->
i_buffer
=
0
;
p_sys
->
i_buffer
=
0
;
block_Release
(
p_block
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
if
(
frame
.
channels
<=
0
||
frame
.
channels
>
6
)
if
(
frame
.
channels
<=
0
||
frame
.
channels
>
6
)
...
@@ -225,6 +227,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
...
@@ -225,6 +227,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
msg_Warn
(
p_dec
,
"invalid channels count"
);
msg_Warn
(
p_dec
,
"invalid channels count"
);
/* flush the buffer */
/* flush the buffer */
p_sys
->
i_buffer
=
0
;
p_sys
->
i_buffer
=
0
;
block_Release
(
p_block
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
if
(
frame
.
samples
<=
0
)
if
(
frame
.
samples
<=
0
)
...
@@ -232,6 +235,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
...
@@ -232,6 +235,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
msg_Warn
(
p_dec
,
"decoded zero samples"
);
msg_Warn
(
p_dec
,
"decoded zero samples"
);
/* flush the buffer */
/* flush the buffer */
p_sys
->
i_buffer
=
0
;
p_sys
->
i_buffer
=
0
;
block_Release
(
p_block
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -264,6 +268,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
...
@@ -264,6 +268,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
if
(
p_sys
->
p_aout_input
==
NULL
)
if
(
p_sys
->
p_aout_input
==
NULL
)
{
{
msg_Err
(
p_dec
,
"cannot create aout"
);
msg_Err
(
p_dec
,
"cannot create aout"
);
block_Release
(
p_block
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
@@ -284,6 +289,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
...
@@ -284,6 +289,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
frame
.
samples
/
frame
.
channels
)
)
==
NULL
)
frame
.
samples
/
frame
.
channels
)
)
==
NULL
)
{
{
msg_Err
(
p_dec
,
"cannot get a new buffer"
);
msg_Err
(
p_dec
,
"cannot get a new buffer"
);
block_Release
(
p_block
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
out
->
start_date
=
aout_DateGet
(
&
p_sys
->
date
);
out
->
start_date
=
aout_DateGet
(
&
p_sys
->
date
);
...
@@ -300,6 +306,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
...
@@ -300,6 +306,7 @@ static int RunDecoder ( decoder_t *p_dec, block_t *p_block )
memmove
(
&
p_sys
->
p_buffer
[
0
],
&
p_sys
->
p_buffer
[
i_used
],
p_sys
->
i_buffer
);
memmove
(
&
p_sys
->
p_buffer
[
0
],
&
p_sys
->
p_buffer
[
i_used
],
p_sys
->
i_buffer
);
}
}
block_Release
(
p_block
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
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