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
13c90bc9
Commit
13c90bc9
authored
Aug 15, 2014
by
Nidhi Makhijani
Committed by
Diego Biurrun
Aug 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adts: Return more meaningful error codes
Signed-off-by:
Diego Biurrun
<
diego@biurrun.de
>
parent
593aaee9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
adtsenc.c
libavformat/adtsenc.c
+8
-8
No files found.
libavformat/adtsenc.c
View file @
13c90bc9
...
...
@@ -57,23 +57,23 @@ static int adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, uint8_t
if
(
adts
->
objecttype
>
3U
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"MPEG-4 AOT %d is not allowed in ADTS
\n
"
,
adts
->
objecttype
+
1
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
if
(
adts
->
sample_rate_index
==
15
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Escape sample rate index illegal in ADTS
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
if
(
get_bits
(
&
gb
,
1
))
{
av_log
(
s
,
AV_LOG_ERROR
,
"960/120 MDCT window is not allowed in ADTS
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
if
(
get_bits
(
&
gb
,
1
))
{
av_log
(
s
,
AV_LOG_ERROR
,
"Scalable configurations are not allowed in ADTS
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
if
(
get_bits
(
&
gb
,
1
))
{
av_log
(
s
,
AV_LOG_ERROR
,
"Extension flag is not allowed in ADTS
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
if
(
!
adts
->
channel_conf
)
{
init_put_bits
(
&
pb
,
adts
->
pce_data
,
MAX_PCE_SIZE
);
...
...
@@ -93,9 +93,9 @@ static int adts_write_header(AVFormatContext *s)
ADTSContext
*
adts
=
s
->
priv_data
;
AVCodecContext
*
avc
=
s
->
streams
[
0
]
->
codec
;
if
(
avc
->
extradata_size
>
0
&&
adts_decode_extradata
(
s
,
adts
,
avc
->
extradata
,
avc
->
extradata_size
)
<
0
)
return
-
1
;
if
(
avc
->
extradata_size
>
0
)
return
adts_decode_extradata
(
s
,
adts
,
avc
->
extradata
,
avc
->
extradata_size
)
;
return
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