Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
48e39d44
Commit
48e39d44
authored
Aug 25, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block_t ** parameter is never NULL for audio decoding
parent
63227deb
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
34 deletions
+20
-34
modules/codec/adpcm.c
modules/codec/adpcm.c
+2
-4
modules/codec/araw.c
modules/codec/araw.c
+2
-3
modules/codec/avcodec/audio.c
modules/codec/avcodec/audio.c
+2
-4
modules/codec/faad.c
modules/codec/faad.c
+2
-4
modules/codec/flac.c
modules/codec/flac.c
+5
-4
modules/codec/fluidsynth.c
modules/codec/fluidsynth.c
+1
-4
modules/codec/omxil/omxil.c
modules/codec/omxil/omxil.c
+2
-4
modules/codec/quicktime.c
modules/codec/quicktime.c
+2
-3
modules/codec/wmafixed/wma.c
modules/codec/wmafixed/wma.c
+2
-4
No files found.
modules/codec/adpcm.c
View file @
48e39d44
...
@@ -268,11 +268,9 @@ static int OpenDecoder( vlc_object_t *p_this )
...
@@ -268,11 +268,9 @@ static int OpenDecoder( vlc_object_t *p_this )
static
aout_buffer_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
aout_buffer_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
block_t
*
p_block
;
block_t
*
p_block
=
*
pp_block
;
if
(
!
pp_block
||
!*
pp_block
)
return
NULL
;
if
(
!
p_block
)
return
NULL
;
p_block
=
*
pp_block
;
if
(
p_block
->
i_pts
>
VLC_TS_INVALID
&&
if
(
p_block
->
i_pts
>
VLC_TS_INVALID
&&
p_block
->
i_pts
!=
date_Get
(
&
p_sys
->
end_date
)
)
p_block
->
i_pts
!=
date_Get
(
&
p_sys
->
end_date
)
)
...
...
modules/codec/araw.c
View file @
48e39d44
...
@@ -346,11 +346,10 @@ static int DecoderOpen( vlc_object_t *p_this )
...
@@ -346,11 +346,10 @@ static int DecoderOpen( vlc_object_t *p_this )
static
aout_buffer_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
aout_buffer_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
if
(
!
pp_block
||
!*
pp_block
)
return
NULL
;
block_t
*
p_block
=
*
pp_block
;
block_t
*
p_block
=
*
pp_block
;
if
(
!
p_block
)
return
NULL
;
if
(
p_block
->
i_pts
>
VLC_TS_INVALID
&&
if
(
p_block
->
i_pts
>
VLC_TS_INVALID
&&
p_block
->
i_pts
!=
date_Get
(
&
p_sys
->
end_date
)
)
p_block
->
i_pts
!=
date_Get
(
&
p_sys
->
end_date
)
)
{
{
...
...
modules/codec/avcodec/audio.c
View file @
48e39d44
...
@@ -257,12 +257,10 @@ aout_buffer_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
...
@@ -257,12 +257,10 @@ aout_buffer_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
int
i_used
,
i_output
;
int
i_used
,
i_output
;
aout_buffer_t
*
p_buffer
;
aout_buffer_t
*
p_buffer
;
block_t
*
p_block
;
block_t
*
p_block
=
*
pp_block
;
AVPacket
pkt
;
AVPacket
pkt
;
if
(
!
pp_block
||
!*
pp_block
)
return
NULL
;
if
(
!
p_block
)
return
NULL
;
p_block
=
*
pp_block
;
if
(
!
p_sys
->
p_context
->
extradata_size
&&
p_dec
->
fmt_in
.
i_extra
&&
if
(
!
p_sys
->
p_context
->
extradata_size
&&
p_dec
->
fmt_in
.
i_extra
&&
p_sys
->
b_delayed_open
)
p_sys
->
b_delayed_open
)
...
...
modules/codec/faad.c
View file @
48e39d44
...
@@ -203,11 +203,9 @@ static int Open( vlc_object_t *p_this )
...
@@ -203,11 +203,9 @@ static int Open( vlc_object_t *p_this )
static
aout_buffer_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
aout_buffer_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
block_t
*
p_block
;
block_t
*
p_block
=
*
pp_block
;
if
(
!
pp_block
||
!*
pp_block
)
return
NULL
;
if
(
!
p_block
)
return
NULL
;
p_block
=
*
pp_block
;
if
(
p_block
->
i_flags
&
(
BLOCK_FLAG_DISCONTINUITY
|
BLOCK_FLAG_CORRUPTED
)
)
if
(
p_block
->
i_flags
&
(
BLOCK_FLAG_DISCONTINUITY
|
BLOCK_FLAG_CORRUPTED
)
)
{
{
...
...
modules/codec/flac.c
View file @
48e39d44
...
@@ -527,19 +527,20 @@ static void decoder_state_error( decoder_t *p_dec,
...
@@ -527,19 +527,20 @@ static void decoder_state_error( decoder_t *p_dec,
static
aout_buffer_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
aout_buffer_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
block_t
*
p_block
=
*
pp_block
;
if
(
!
p
p_block
||
!*
pp
_block
)
if
(
!
p_block
)
return
NULL
;
return
NULL
;
if
(
(
*
pp_block
)
->
i_flags
&
(
BLOCK_FLAG_DISCONTINUITY
|
BLOCK_FLAG_CORRUPTED
)
)
if
(
p_block
->
i_flags
&
(
BLOCK_FLAG_DISCONTINUITY
|
BLOCK_FLAG_CORRUPTED
)
)
{
{
block_Release
(
*
p
p_block
);
block_Release
(
p_block
);
return
NULL
;
return
NULL
;
}
}
if
(
!
p_sys
->
b_stream_info
)
if
(
!
p_sys
->
b_stream_info
)
ProcessHeader
(
p_dec
);
ProcessHeader
(
p_dec
);
p_sys
->
p_block
=
*
p
p_block
;
p_sys
->
p_block
=
p_block
;
*
pp_block
=
NULL
;
*
pp_block
=
NULL
;
if
(
p_sys
->
p_block
->
i_pts
>
VLC_TS_INVALID
&&
if
(
p_sys
->
p_block
->
i_pts
>
VLC_TS_INVALID
&&
...
...
modules/codec/fluidsynth.c
View file @
48e39d44
...
@@ -165,13 +165,10 @@ static void Close (vlc_object_t *p_this)
...
@@ -165,13 +165,10 @@ static void Close (vlc_object_t *p_this)
static
aout_buffer_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
aout_buffer_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
{
block_t
*
p_block
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
block_t
*
p_block
=
*
pp_block
;
aout_buffer_t
*
p_out
=
NULL
;
aout_buffer_t
*
p_out
=
NULL
;
if
(
pp_block
==
NULL
)
return
NULL
;
p_block
=
*
pp_block
;
if
(
p_block
==
NULL
)
if
(
p_block
==
NULL
)
return
NULL
;
return
NULL
;
*
pp_block
=
NULL
;
*
pp_block
=
NULL
;
...
...
modules/codec/omxil/omxil.c
View file @
48e39d44
...
@@ -1154,12 +1154,10 @@ aout_buffer_t *DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
...
@@ -1154,12 +1154,10 @@ aout_buffer_t *DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
aout_buffer_t
*
p_buffer
=
0
;
aout_buffer_t
*
p_buffer
=
0
;
OMX_BUFFERHEADERTYPE
*
p_header
;
OMX_BUFFERHEADERTYPE
*
p_header
;
OMX_ERRORTYPE
omx_error
;
OMX_ERRORTYPE
omx_error
;
block_t
*
p_block
;
block_t
*
p_block
=
*
pp_block
;
unsigned
int
i
;
unsigned
int
i
;
if
(
!
pp_block
||
!*
pp_block
)
return
NULL
;
if
(
!
p_block
)
return
NULL
;
p_block
=
*
pp_block
;
/* Check for errors from codec */
/* Check for errors from codec */
if
(
p_sys
->
b_error
)
if
(
p_sys
->
b_error
)
...
...
modules/codec/quicktime.c
View file @
48e39d44
...
@@ -528,7 +528,7 @@ static aout_buffer_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block )
...
@@ -528,7 +528,7 @@ static aout_buffer_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block )
{
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
block_t
*
p_block
;
block_t
*
p_block
=
*
pp_block
;
int
i_error
;
int
i_error
;
#ifdef LOADER
#ifdef LOADER
...
@@ -547,11 +547,10 @@ static aout_buffer_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block )
...
@@ -547,11 +547,10 @@ static aout_buffer_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block )
}
}
#endif
#endif
if
(
p
p_block
==
NULL
||
*
pp
_block
==
NULL
)
if
(
p_block
==
NULL
)
{
{
return
NULL
;
return
NULL
;
}
}
p_block
=
*
pp_block
;
if
(
p_sys
->
i_out_frames
>
0
&&
p_sys
->
i_out
>=
p_sys
->
i_out_frames
)
if
(
p_sys
->
i_out_frames
>
0
&&
p_sys
->
i_out
>=
p_sys
->
i_out_frames
)
{
{
...
...
modules/codec/wmafixed/wma.c
View file @
48e39d44
...
@@ -195,15 +195,13 @@ static int OpenDecoder( vlc_object_t *p_this )
...
@@ -195,15 +195,13 @@ static int OpenDecoder( vlc_object_t *p_this )
static
aout_buffer_t
*
DecodeFrame
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
aout_buffer_t
*
DecodeFrame
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
block_t
*
p_block
;
block_t
*
p_block
=
*
pp_block
;
aout_buffer_t
*
p_aout_buffer
=
NULL
;
aout_buffer_t
*
p_aout_buffer
=
NULL
;
#ifdef NDEBUG
#ifdef NDEBUG
mtime_t
start
=
mdate
();
/* for statistics */
mtime_t
start
=
mdate
();
/* for statistics */
#endif
#endif
if
(
!
pp_block
||
!*
pp_block
)
return
NULL
;
if
(
!
p_block
)
return
NULL
;
p_block
=
*
pp_block
;
if
(
p_block
->
i_flags
&
(
BLOCK_FLAG_DISCONTINUITY
|
BLOCK_FLAG_CORRUPTED
)
)
if
(
p_block
->
i_flags
&
(
BLOCK_FLAG_DISCONTINUITY
|
BLOCK_FLAG_CORRUPTED
)
)
{
{
...
...
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