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
7100d63c
Commit
7100d63c
authored
Mar 04, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3enc: use av_assert2() instead of assert() to make debugging easier.
parent
d21be5f1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
ac3enc.c
libavcodec/ac3enc.c
+5
-3
No files found.
libavcodec/ac3enc.c
View file @
7100d63c
...
...
@@ -27,8 +27,10 @@
*/
//#define DEBUG
//#define ASSERT_LEVEL 2
#include "libavutil/audioconvert.h"
#include "libavutil/avassert.h"
#include "libavutil/crc.h"
#include "avcodec.h"
#include "put_bits.h"
...
...
@@ -1101,7 +1103,7 @@ static inline int sym_quant(int c, int e, int levels)
v
=
(
v
+
1
)
>>
1
;
v
=
(
levels
>>
1
)
-
v
;
}
a
ssert
(
v
>=
0
&&
v
<
levels
);
a
v_assert2
(
v
>=
0
&&
v
<
levels
);
return
v
;
}
...
...
@@ -1123,7 +1125,7 @@ static inline int asym_quant(int c, int e, int qbits)
m
=
(
1
<<
(
qbits
-
1
));
if
(
v
>=
m
)
v
=
m
-
1
;
a
ssert
(
v
>=
-
m
);
a
v_assert2
(
v
>=
-
m
);
return
v
&
((
1
<<
qbits
)
-
1
);
}
...
...
@@ -1439,7 +1441,7 @@ static void output_frame_end(AC3EncodeContext *s)
flush_put_bits
(
&
s
->
pb
);
frame
=
s
->
pb
.
buf
;
pad_bytes
=
s
->
frame_size
-
(
put_bits_ptr
(
&
s
->
pb
)
-
frame
)
-
2
;
a
ssert
(
pad_bytes
>=
0
);
a
v_assert2
(
pad_bytes
>=
0
);
if
(
pad_bytes
>
0
)
memset
(
put_bits_ptr
(
&
s
->
pb
),
0
,
pad_bytes
);
...
...
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