Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
38665efc
Commit
38665efc
authored
Apr 07, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asfenc: convert asserts to av_assert
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
1fabd950
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
asfenc.c
libavformat/asfenc.c
+6
-5
No files found.
libavformat/asfenc.c
View file @
38665efc
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
*/
#include "libavutil/avassert.h"
#include "libavutil/dict.h"
#include "libavutil/dict.h"
#include "avformat.h"
#include "avformat.h"
#include "avio_internal.h"
#include "avio_internal.h"
...
@@ -220,7 +221,7 @@ static const AVCodecTag codec_asf_bmp_tags[] = {
...
@@ -220,7 +221,7 @@ static const AVCodecTag codec_asf_bmp_tags[] = {
void
ff_put_guid
(
AVIOContext
*
s
,
const
ff_asf_guid
*
g
)
void
ff_put_guid
(
AVIOContext
*
s
,
const
ff_asf_guid
*
g
)
{
{
a
ssert
(
sizeof
(
*
g
)
==
16
);
a
v_assert0
(
sizeof
(
*
g
)
==
16
);
avio_write
(
s
,
*
g
,
sizeof
(
*
g
));
avio_write
(
s
,
*
g
,
sizeof
(
*
g
));
}
}
...
@@ -600,7 +601,7 @@ static int put_payload_parsing_info(AVFormatContext *s,
...
@@ -600,7 +601,7 @@ static int put_payload_parsing_info(AVFormatContext *s,
padsize
-=
PACKET_HEADER_MIN_SIZE
;
padsize
-=
PACKET_HEADER_MIN_SIZE
;
if
(
asf
->
multi_payloads_present
)
if
(
asf
->
multi_payloads_present
)
padsize
--
;
padsize
--
;
a
ssert
(
padsize
>=
0
);
a
v_assert0
(
padsize
>=
0
);
avio_w8
(
pb
,
ASF_PACKET_ERROR_CORRECTION_FLAGS
);
avio_w8
(
pb
,
ASF_PACKET_ERROR_CORRECTION_FLAGS
);
for
(
i
=
0
;
i
<
ASF_PACKET_ERROR_CORRECTION_DATA_SIZE
;
i
++
)
for
(
i
=
0
;
i
<
ASF_PACKET_ERROR_CORRECTION_DATA_SIZE
;
i
++
)
...
@@ -639,7 +640,7 @@ static void flush_packet(AVFormatContext *s)
...
@@ -639,7 +640,7 @@ static void flush_packet(AVFormatContext *s)
ASFContext
*
asf
=
s
->
priv_data
;
ASFContext
*
asf
=
s
->
priv_data
;
int
packet_hdr_size
,
packet_filled_size
;
int
packet_hdr_size
,
packet_filled_size
;
a
ssert
(
asf
->
packet_timestamp_end
>=
asf
->
packet_timestamp_start
);
a
v_assert0
(
asf
->
packet_timestamp_end
>=
asf
->
packet_timestamp_start
);
if
(
asf
->
is_streamed
)
if
(
asf
->
is_streamed
)
put_chunk
(
s
,
0x4424
,
s
->
packet_size
,
0
);
put_chunk
(
s
,
0x4424
,
s
->
packet_size
,
0
);
...
@@ -651,7 +652,7 @@ static void flush_packet(AVFormatContext *s)
...
@@ -651,7 +652,7 @@ static void flush_packet(AVFormatContext *s)
asf
->
packet_size_left
);
asf
->
packet_size_left
);
packet_filled_size
=
PACKET_SIZE
-
asf
->
packet_size_left
;
packet_filled_size
=
PACKET_SIZE
-
asf
->
packet_size_left
;
a
ssert
(
packet_hdr_size
<=
asf
->
packet_size_left
);
a
v_assert0
(
packet_hdr_size
<=
asf
->
packet_size_left
);
memset
(
asf
->
packet_buf
+
packet_filled_size
,
0
,
asf
->
packet_size_left
);
memset
(
asf
->
packet_buf
+
packet_filled_size
,
0
,
asf
->
packet_size_left
);
avio_write
(
s
->
pb
,
asf
->
packet_buf
,
s
->
packet_size
-
packet_hdr_size
);
avio_write
(
s
->
pb
,
asf
->
packet_buf
,
s
->
packet_size
-
packet_hdr_size
);
...
@@ -804,7 +805,7 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -804,7 +805,7 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
flags
&=
~
AV_PKT_FLAG_KEY
;
flags
&=
~
AV_PKT_FLAG_KEY
;
pts
=
(
pkt
->
pts
!=
AV_NOPTS_VALUE
)
?
pkt
->
pts
:
pkt
->
dts
;
pts
=
(
pkt
->
pts
!=
AV_NOPTS_VALUE
)
?
pkt
->
pts
:
pkt
->
dts
;
a
ssert
(
pts
!=
AV_NOPTS_VALUE
);
a
v_assert0
(
pts
!=
AV_NOPTS_VALUE
);
pts
*=
10000
;
pts
*=
10000
;
asf
->
duration
=
FFMAX
(
asf
->
duration
,
pts
+
pkt
->
duration
*
10000
);
asf
->
duration
=
FFMAX
(
asf
->
duration
,
pts
+
pkt
->
duration
*
10000
);
...
...
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