Commit eaf65538 authored by Michael Niedermayer's avatar Michael Niedermayer

avienc: use av_assert

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 4aed3ac8
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "riff.h" #include "riff.h"
#include "libavutil/intreadwrite.h" #include "libavutil/intreadwrite.h"
#include "libavutil/dict.h" #include "libavutil/dict.h"
#include "libavutil/avassert.h"
/* /*
* TODO: * TODO:
...@@ -130,7 +131,7 @@ static int avi_write_counters(AVFormatContext* s, int riff_id) ...@@ -130,7 +131,7 @@ static int avi_write_counters(AVFormatContext* s, int riff_id)
for(n = 0; n < s->nb_streams; n++) { for(n = 0; n < s->nb_streams; n++) {
AVIStream *avist= s->streams[n]->priv_data; AVIStream *avist= s->streams[n]->priv_data;
assert(avist->frames_hdr_strm); av_assert0(avist->frames_hdr_strm);
stream = s->streams[n]->codec; stream = s->streams[n]->codec;
avio_seek(pb, avist->frames_hdr_strm, SEEK_SET); avio_seek(pb, avist->frames_hdr_strm, SEEK_SET);
ff_parse_specific_params(stream, &au_byterate, &au_ssize, &au_scale); ff_parse_specific_params(stream, &au_byterate, &au_ssize, &au_scale);
...@@ -143,7 +144,7 @@ static int avi_write_counters(AVFormatContext* s, int riff_id) ...@@ -143,7 +144,7 @@ static int avi_write_counters(AVFormatContext* s, int riff_id)
nb_frames = FFMAX(nb_frames, avist->packet_count); nb_frames = FFMAX(nb_frames, avist->packet_count);
} }
if(riff_id == 1) { if(riff_id == 1) {
assert(avi->frames_hdr_all); av_assert0(avi->frames_hdr_all);
avio_seek(pb, avi->frames_hdr_all, SEEK_SET); avio_seek(pb, avi->frames_hdr_all, SEEK_SET);
avio_wl32(pb, nb_frames); avio_wl32(pb, nb_frames);
} }
...@@ -411,7 +412,7 @@ static int avi_write_ix(AVFormatContext *s) ...@@ -411,7 +412,7 @@ static int avi_write_ix(AVFormatContext *s)
char ix_tag[] = "ix00"; char ix_tag[] = "ix00";
int i, j; int i, j;
assert(pb->seekable); av_assert0(pb->seekable);
if (avi->riff_id > AVI_MASTER_INDEX_SIZE) if (avi->riff_id > AVI_MASTER_INDEX_SIZE)
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment