asfenc: convert asserts to av_assert

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-04-07 03:46:50 +02:00
parent 1fabd95035
commit 38665efcc7
1 changed files with 6 additions and 5 deletions

View File

@ -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);