Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
cdf2f061
Commit
cdf2f061
authored
Jul 10, 2017
by
Steve Lhomme
Committed by
Jean-Baptiste Kempf
Jul 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packetizer:copy: set the codec id on fmt_out when everything is correct
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
373950c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
modules/packetizer/copy.c
modules/packetizer/copy.c
+13
-12
No files found.
modules/packetizer/copy.c
View file @
cdf2f061
...
...
@@ -93,18 +93,6 @@ static int Open( vlc_object_t *p_this )
/* Create the output format */
es_format_Copy
(
&
p_dec
->
fmt_out
,
&
p_dec
->
fmt_in
);
/* Fix the value of the fourcc for audio */
if
(
p_dec
->
fmt_in
.
i_cat
==
AUDIO_ES
)
{
p_dec
->
fmt_out
.
i_codec
=
vlc_fourcc_GetCodecAudio
(
p_dec
->
fmt_in
.
i_codec
,
p_dec
->
fmt_in
.
audio
.
i_bitspersample
);
if
(
!
p_dec
->
fmt_out
.
i_codec
)
{
msg_Err
(
p_dec
,
"unknown raw audio sample size"
);
return
VLC_EGENERIC
;
}
}
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
*
p_sys
)
);
if
(
unlikely
(
p_sys
==
NULL
))
return
VLC_ENOMEM
;
...
...
@@ -120,6 +108,19 @@ static int Open( vlc_object_t *p_this )
break
;
}
/* Fix the value of the fourcc for audio */
if
(
p_dec
->
fmt_in
.
i_cat
==
AUDIO_ES
)
{
vlc_fourcc_t
fcc
=
vlc_fourcc_GetCodecAudio
(
p_dec
->
fmt_in
.
i_codec
,
p_dec
->
fmt_in
.
audio
.
i_bitspersample
);
if
(
!
fcc
)
{
msg_Err
(
p_dec
,
"unknown raw audio sample size"
);
return
VLC_EGENERIC
;
}
p_dec
->
fmt_out
.
i_codec
=
fcc
;
}
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