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
869b56ca
Commit
869b56ca
authored
Dec 19, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mpegenc: replace always enabled asserts by av_assert0()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
b44ae59b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
mpegenc.c
libavformat/mpegenc.c
+6
-9
No files found.
libavformat/mpegenc.c
View file @
869b56ca
...
...
@@ -35,9 +35,6 @@
#define MAX_PAYLOAD_SIZE 4096
#undef NDEBUG
#include <assert.h>
typedef
struct
PacketDesc
{
int64_t
pts
;
int64_t
dts
;
...
...
@@ -874,7 +871,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index,
}
/* output data */
a
ssert
(
payload_size
-
stuffing_size
<=
av_fifo_size
(
stream
->
fifo
));
a
v_assert0
(
payload_size
-
stuffing_size
<=
av_fifo_size
(
stream
->
fifo
));
av_fifo_generic_read
(
stream
->
fifo
,
ctx
->
pb
,
payload_size
-
stuffing_size
,
(
void
(
*
)(
void
*
,
void
*
,
int
))
avio_write
);
...
...
@@ -1028,14 +1025,14 @@ retry:
goto
retry
;
}
a
ssert
(
best_i
>=
0
);
a
v_assert0
(
best_i
>=
0
);
st
=
ctx
->
streams
[
best_i
];
stream
=
st
->
priv_data
;
a
ssert
(
av_fifo_size
(
stream
->
fifo
)
>
0
);
a
v_assert0
(
av_fifo_size
(
stream
->
fifo
)
>
0
);
a
ssert
(
avail_space
>=
s
->
packet_size
||
ignore_constraints
);
a
v_assert0
(
avail_space
>=
s
->
packet_size
||
ignore_constraints
);
timestamp_packet
=
stream
->
premux_packet
;
if
(
timestamp_packet
->
unwritten_size
==
timestamp_packet
->
size
)
{
...
...
@@ -1053,7 +1050,7 @@ retry:
es_size
=
flush_packet
(
ctx
,
best_i
,
timestamp_packet
->
pts
,
timestamp_packet
->
dts
,
scr
,
trailer_size
);
}
else
{
a
ssert
(
av_fifo_size
(
stream
->
fifo
)
==
trailer_size
);
a
v_assert0
(
av_fifo_size
(
stream
->
fifo
)
==
trailer_size
);
es_size
=
flush_packet
(
ctx
,
best_i
,
AV_NOPTS_VALUE
,
AV_NOPTS_VALUE
,
scr
,
trailer_size
);
}
...
...
@@ -1186,7 +1183,7 @@ static int mpeg_mux_end(AVFormatContext *ctx)
for
(
i
=
0
;
i
<
ctx
->
nb_streams
;
i
++
)
{
stream
=
ctx
->
streams
[
i
]
->
priv_data
;
a
ssert
(
av_fifo_size
(
stream
->
fifo
)
==
0
);
a
v_assert0
(
av_fifo_size
(
stream
->
fifo
)
==
0
);
av_fifo_freep
(
&
stream
->
fifo
);
}
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