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
82be06bb
Commit
82be06bb
authored
Oct 13, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlpdec: return meaningful error codes instead of -1
parent
e1b8d88d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
57 deletions
+61
-57
mlp_parser.c
libavcodec/mlp_parser.c
+3
-3
mlpdec.c
libavcodec/mlpdec.c
+58
-54
No files found.
libavcodec/mlp_parser.c
View file @
82be06bb
...
...
@@ -138,11 +138,11 @@ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
checksum
=
ff_mlp_checksum16
(
gb
->
buffer
,
26
);
if
(
checksum
!=
AV_RL16
(
gb
->
buffer
+
26
))
{
av_log
(
log
,
AV_LOG_ERROR
,
"major sync info header checksum error
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
if
(
get_bits_long
(
gb
,
24
)
!=
0xf8726f
)
/* Sync words */
return
-
1
;
return
AVERROR_INVALIDDATA
;
mh
->
stream_type
=
get_bits
(
gb
,
8
);
...
...
@@ -173,7 +173,7 @@ int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb)
mh
->
channels_thd_stream2
=
get_bits
(
gb
,
13
);
}
else
return
-
1
;
return
AVERROR_INVALIDDATA
;
mh
->
access_unit_size
=
40
<<
(
ratebits
&
7
);
mh
->
access_unit_size_pow2
=
64
<<
(
ratebits
&
7
);
...
...
libavcodec/mlpdec.c
View file @
82be06bb
This diff is collapsed.
Click to expand it.
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