[FFmpeg-cvslog] asfenc: convert asserts to av_assert
Michael Niedermayer
git at videolan.org
Sun Apr 7 04:01:05 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 7 03:46:50 2013 +0200| [38665efcc71ff7b0de9c012c0c4f2e509907be24] | committer: Michael Niedermayer
asfenc: convert asserts to av_assert
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=38665efcc71ff7b0de9c012c0c4f2e509907be24
---
libavformat/asfenc.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index f3aec9c..6daf238 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/avassert.h"
#include "libavutil/dict.h"
#include "avformat.h"
#include "avio_internal.h"
@@ -220,7 +221,7 @@ static const AVCodecTag codec_asf_bmp_tags[] = {
void ff_put_guid(AVIOContext *s, const ff_asf_guid *g)
{
- assert(sizeof(*g) == 16);
+ av_assert0(sizeof(*g) == 16);
avio_write(s, *g, sizeof(*g));
}
@@ -600,7 +601,7 @@ static int put_payload_parsing_info(AVFormatContext *s,
padsize -= PACKET_HEADER_MIN_SIZE;
if (asf->multi_payloads_present)
padsize--;
- assert(padsize >= 0);
+ av_assert0(padsize >= 0);
avio_w8(pb, ASF_PACKET_ERROR_CORRECTION_FLAGS);
for (i = 0; i < ASF_PACKET_ERROR_CORRECTION_DATA_SIZE; i++)
@@ -639,7 +640,7 @@ static void flush_packet(AVFormatContext *s)
ASFContext *asf = s->priv_data;
int packet_hdr_size, packet_filled_size;
- assert(asf->packet_timestamp_end >= asf->packet_timestamp_start);
+ av_assert0(asf->packet_timestamp_end >= asf->packet_timestamp_start);
if (asf->is_streamed)
put_chunk(s, 0x4424, s->packet_size, 0);
@@ -651,7 +652,7 @@ static void flush_packet(AVFormatContext *s)
asf->packet_size_left);
packet_filled_size = PACKET_SIZE - asf->packet_size_left;
- assert(packet_hdr_size <= asf->packet_size_left);
+ av_assert0(packet_hdr_size <= 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);
@@ -804,7 +805,7 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
flags &= ~AV_PKT_FLAG_KEY;
pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts;
- assert(pts != AV_NOPTS_VALUE);
+ av_assert0(pts != AV_NOPTS_VALUE);
pts *= 10000;
asf->duration = FFMAX(asf->duration, pts + pkt->duration * 10000);
More information about the ffmpeg-cvslog
mailing list