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
827667ec
Commit
827667ec
authored
Jun 20, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mjpegenc: use av_assert
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
4eae08b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
mjpegenc.c
libavcodec/mjpegenc.c
+4
-7
No files found.
libavcodec/mjpegenc.c
View file @
827667ec
...
...
@@ -30,9 +30,6 @@
* MJPEG encoder.
*/
//#define DEBUG
#include <assert.h>
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
...
...
@@ -222,7 +219,7 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s)
switch
(
s
->
avctx
->
codec_id
){
case
CODEC_ID_MJPEG
:
put_marker
(
&
s
->
pb
,
SOF0
);
break
;
case
CODEC_ID_LJPEG
:
put_marker
(
&
s
->
pb
,
SOF3
);
break
;
default:
a
ssert
(
0
);
default:
a
v_assert0
(
0
);
}
put_bits
(
&
s
->
pb
,
16
,
17
);
...
...
@@ -287,7 +284,7 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s)
switch
(
s
->
avctx
->
codec_id
){
case
CODEC_ID_MJPEG
:
put_bits
(
&
s
->
pb
,
8
,
63
);
break
;
/* Se (not used) */
case
CODEC_ID_LJPEG
:
put_bits
(
&
s
->
pb
,
8
,
0
);
break
;
/* not used */
default:
a
ssert
(
0
);
default:
a
v_assert0
(
0
);
}
put_bits
(
&
s
->
pb
,
8
,
0
);
/* Ah/Al (not used) */
...
...
@@ -305,7 +302,7 @@ static void escape_FF(MpegEncContext *s, int start)
uint8_t
*
buf
=
s
->
pb
.
buf
+
start
;
int
align
=
(
-
(
size_t
)(
buf
))
&
3
;
a
ssert
((
size
&
7
)
==
0
);
a
v_assert1
((
size
&
7
)
==
0
);
size
>>=
3
;
ff_count
=
0
;
...
...
@@ -373,7 +370,7 @@ void ff_mjpeg_encode_stuffing(MpegEncContext *s)
void
ff_mjpeg_encode_picture_trailer
(
MpegEncContext
*
s
)
{
a
ssert
((
s
->
header_bits
&
7
)
==
0
);
a
v_assert1
((
s
->
header_bits
&
7
)
==
0
);
put_marker
(
&
s
->
pb
,
EOI
);
...
...
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