diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-10-01 13:16:16 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-10-01 13:16:16 +0000 |
commit | 71c32f19b346f565c23d282f327e84a6af39edc7 (patch) | |
tree | aeed385c079434edbc9e985ae60bf68538d468cd /libavformat/ffm.c | |
parent | 9fe5a7b83107051812a00eaebb01db11d7378980 (diff) | |
download | ffmpeg-71c32f19b346f565c23d282f327e84a6af39edc7.tar.gz |
do not call (av_)abort()
Originally committed as revision 3544 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ffm.c')
-rw-r--r-- | libavformat/ffm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavformat/ffm.c b/libavformat/ffm.c index 22a2a812ff..89764c3497 100644 --- a/libavformat/ffm.c +++ b/libavformat/ffm.c @@ -190,7 +190,7 @@ static int ffm_write_header(AVFormatContext *s) put_le16(pb, codec->frame_size); break; default: - av_abort(); + return -1; } /* hack to have real time */ if (ffm_nopts) @@ -208,8 +208,7 @@ static int ffm_write_header(AVFormatContext *s) /* init packet mux */ ffm->packet_ptr = ffm->packet; ffm->packet_end = ffm->packet + ffm->packet_size - FFM_HEADER_SIZE; - if (ffm->packet_end < ffm->packet) - av_abort(); + assert(ffm->packet_end >= ffm->packet); ffm->frame_offset = 0; ffm->pts = 0; ffm->first_packet = 1; @@ -340,7 +339,7 @@ static int ffm_read_data(AVFormatContext *s, get_buffer(pb, ffm->packet, ffm->packet_size - FFM_HEADER_SIZE); ffm->packet_end = ffm->packet + (ffm->packet_size - FFM_HEADER_SIZE - fill_size); if (ffm->packet_end < ffm->packet) - av_abort(); + return -1; /* if first packet or resynchronization packet, we must handle it specifically */ if (ffm->first_packet || (frame_offset & 0x8000)) { @@ -355,7 +354,7 @@ static int ffm_read_data(AVFormatContext *s, } ffm->first_packet = 0; if ((frame_offset & 0x7ffff) < FFM_HEADER_SIZE) - av_abort(); + return -1; ffm->packet_ptr = ffm->packet + (frame_offset & 0x7fff) - FFM_HEADER_SIZE; if (!first) break; |