Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
e01af7eb
Commit
e01af7eb
authored
Dec 04, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for avcodec SAMPLE_FMT_*.
parent
73c96a16
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
modules/codec/avcodec/audio.c
modules/codec/avcodec/audio.c
+30
-1
No files found.
modules/codec/avcodec/audio.c
View file @
e01af7eb
...
...
@@ -211,8 +211,37 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
/* Set output properties */
p_dec
->
fmt_out
.
i_cat
=
AUDIO_ES
;
#if defined(AV_VERSION_INT) && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 65, 0 )
switch
(
p_sys
->
p_context
->
sample_fmt
)
{
case
SAMPLE_FMT_U8
:
p_dec
->
fmt_out
.
i_codec
=
VLC_FOURCC
(
'u'
,
'8'
,
' '
,
' '
);
p_dec
->
fmt_out
.
audio
.
i_bitspersample
=
8
;
break
;
case
SAMPLE_FMT_S32
:
p_dec
->
fmt_out
.
i_codec
=
AOUT_FMT_S32_NE
;
p_dec
->
fmt_out
.
audio
.
i_bitspersample
=
32
;
break
;
case
SAMPLE_FMT_FLT
:
p_dec
->
fmt_out
.
i_codec
=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
);
p_dec
->
fmt_out
.
audio
.
i_bitspersample
=
32
;
break
;
case
SAMPLE_FMT_DBL
:
p_dec
->
fmt_out
.
i_codec
=
VLC_FOURCC
(
'f'
,
'l'
,
'6'
,
'4'
);
p_dec
->
fmt_out
.
audio
.
i_bitspersample
=
64
;
break
;
case
SAMPLE_FMT_S16
:
default:
p_dec
->
fmt_out
.
i_codec
=
AOUT_FMT_S16_NE
;
p_dec
->
fmt_out
.
audio
.
i_bitspersample
=
16
;
break
;
}
#else
p_dec
->
fmt_out
.
i_codec
=
AOUT_FMT_S16_NE
;
p_dec
->
fmt_out
.
audio
.
i_bitspersample
=
16
;
#endif
return
VLC_SUCCESS
;
}
...
...
@@ -359,7 +388,7 @@ aout_buffer_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
p_block
->
i_pts
=
0
;
/* **** Now we can output these samples **** */
p_sys
->
i_samples
=
i_output
/
sizeof
(
int16_t
)
/
p_sys
->
p_context
->
channels
;
p_sys
->
i_samples
=
i_output
/
(
p_dec
->
fmt_out
.
audio
.
i_bitspersample
/
8
)
/
p_sys
->
p_context
->
channels
;
p_sys
->
p_samples
=
p_sys
->
p_output
;
/* Silent unwanted samples */
...
...
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