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
78f1c31a
Commit
78f1c31a
authored
Mar 09, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: cosmetics
parent
118c5be3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
modules/codec/avcodec/audio.c
modules/codec/avcodec/audio.c
+7
-9
No files found.
modules/codec/avcodec/audio.c
View file @
78f1c31a
...
...
@@ -240,10 +240,9 @@ block_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
block_t
*
p_block
=
*
pp_block
;
if
(
!
p_sys
->
p_context
->
extradata_size
&&
p_dec
->
fmt_in
.
i_extra
&&
p_sys
->
b_delayed_open
)
if
(
!
ctx
->
extradata_size
&&
p_dec
->
fmt_in
.
i_extra
&&
p_sys
->
b_delayed_open
)
{
InitDecoderConfig
(
p_dec
,
p_sys
->
p_context
);
InitDecoderConfig
(
p_dec
,
ctx
);
if
(
ffmpeg_OpenCodec
(
p_dec
)
)
msg_Err
(
p_dec
,
"Cannot open decoder %s"
,
p_sys
->
psz_namecodec
);
}
...
...
@@ -253,7 +252,7 @@ block_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
if
(
p_block
->
i_flags
&
(
BLOCK_FLAG_DISCONTINUITY
|
BLOCK_FLAG_CORRUPTED
)
)
{
avcodec_flush_buffers
(
p_sys
->
p_context
);
avcodec_flush_buffers
(
ctx
);
date_Set
(
&
p_sys
->
end_date
,
0
);
if
(
p_sys
->
i_codec_id
==
CODEC_ID_MP2
||
p_sys
->
i_codec_id
==
CODEC_ID_MP3
)
...
...
@@ -306,16 +305,15 @@ block_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
p_block
->
i_buffer
-=
used
;
}
if
(
p_sys
->
p_context
->
channels
<=
0
||
p_sys
->
p_context
->
channels
>
8
||
p_sys
->
p_context
->
sample_rate
<=
0
)
if
(
ctx
->
channels
<=
0
||
ctx
->
channels
>
8
||
ctx
->
sample_rate
<=
0
)
{
msg_Warn
(
p_dec
,
"invalid audio properties channels count %d, sample rate %d"
,
p_sys
->
p_context
->
channels
,
p_sys
->
p_context
->
sample_rate
);
ctx
->
channels
,
ctx
->
sample_rate
);
goto
end
;
}
if
(
p_dec
->
fmt_out
.
audio
.
i_rate
!=
(
unsigned
int
)
p_sys
->
p_context
->
sample_rate
)
date_Init
(
&
p_sys
->
end_date
,
p_sys
->
p_context
->
sample_rate
,
1
);
if
(
p_dec
->
fmt_out
.
audio
.
i_rate
!=
(
unsigned
int
)
ctx
->
sample_rate
)
date_Init
(
&
p_sys
->
end_date
,
ctx
->
sample_rate
,
1
);
if
(
p_block
->
i_pts
>
VLC_TS_INVALID
&&
p_block
->
i_pts
!=
date_Get
(
&
p_sys
->
end_date
)
)
...
...
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