Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
c70a6a41
Commit
c70a6a41
authored
Mar 24, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use audio_service_type to set stream disposition.
parent
0b18b49b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
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)
...
@@ -2445,6 +2445,19 @@ int av_find_stream_info(AVFormatContext *ic)
}
else
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
)
{
}
else
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
)
{
if
(
!
st
->
codec
->
bits_per_coded_sample
)
if
(
!
st
->
codec
->
bits_per_coded_sample
)
st
->
codec
->
bits_per_coded_sample
=
av_get_bits_per_sample
(
st
->
codec
->
codec_id
);
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