Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
ffmpeg
Commits
c70a6a41
Commit
c70a6a41
authored
Mar 24, 2011
by
Justin Ruggles
Browse files
Use audio_service_type to set stream disposition.
parent
0b18b49b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
libavformat/utils.c
libavformat/utils.c
+13
-0
No files found.
libavformat/utils.c
View file @
c70a6a41
...
...
@@ -2445,6 +2445,19 @@ int av_find_stream_info(AVFormatContext *ic)
}
else
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
)
{
if
(
!
st
->
codec
->
bits_per_coded_sample
)
st
->
codec
->
bits_per_coded_sample
=
av_get_bits_per_sample
(
st
->
codec
->
codec_id
);
// set stream disposition based on audio service type
switch
(
st
->
codec
->
audio_service_type
)
{
case
AV_AUDIO_SERVICE_TYPE_EFFECTS
:
st
->
disposition
=
AV_DISPOSITION_CLEAN_EFFECTS
;
break
;
case
AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED
:
st
->
disposition
=
AV_DISPOSITION_VISUAL_IMPAIRED
;
break
;
case
AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED
:
st
->
disposition
=
AV_DISPOSITION_HEARING_IMPAIRED
;
break
;
case
AV_AUDIO_SERVICE_TYPE_COMMENTARY
:
st
->
disposition
=
AV_DISPOSITION_COMMENT
;
break
;
case
AV_AUDIO_SERVICE_TYPE_KARAOKE
:
st
->
disposition
=
AV_DISPOSITION_KARAOKE
;
break
;
}
}
}
...
...
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