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
12c2530b
Commit
12c2530b
authored
Aug 01, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
idcin: fix check for presence of an audio stream
parent
b0c96e06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
idcin.c
libavformat/idcin.c
+6
-4
No files found.
libavformat/idcin.c
View file @
12c2530b
...
...
@@ -170,6 +170,10 @@ static int idcin_read_header(AVFormatContext *s)
av_log
(
s
,
AV_LOG_ERROR
,
"invalid channels: %u
\n
"
,
channels
);
return
AVERROR_INVALIDDATA
;
}
idcin
->
audio_present
=
1
;
}
else
{
/* if sample rate is 0, assume no audio */
idcin
->
audio_present
=
0
;
}
st
=
avformat_new_stream
(
s
,
NULL
);
...
...
@@ -190,8 +194,7 @@ static int idcin_read_header(AVFormatContext *s)
HUFFMAN_TABLE_SIZE
)
return
AVERROR
(
EIO
);
/* if sample rate is 0, assume no audio */
if
(
sample_rate
)
{
if
(
idcin
->
audio_present
)
{
idcin
->
audio_present
=
1
;
st
=
avformat_new_stream
(
s
,
NULL
);
if
(
!
st
)
...
...
@@ -220,8 +223,7 @@ static int idcin_read_header(AVFormatContext *s)
(
sample_rate
/
14
)
*
bytes_per_sample
*
channels
;
}
idcin
->
current_audio_chunk
=
0
;
}
else
idcin
->
audio_present
=
1
;
}
idcin
->
next_chunk_is_video
=
1
;
idcin
->
pts
=
0
;
...
...
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