Mercurial > libavformat.hg
changeset 537:558a093b04db libavformat
do not call (av_)abort()
author | michael |
---|---|
date | Fri, 01 Oct 2004 13:16:16 +0000 |
parents | 76c47c58064f |
children | d2cc9c6f5d98 |
files | avienc.c ffm.c mpeg.c raw.c rm.c yuv4mpeg.c |
diffstat | 6 files changed, 10 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/avienc.c Wed Sep 29 23:25:01 2004 +0000 +++ b/avienc.c Fri Oct 01 13:16:16 2004 +0000 @@ -422,7 +422,7 @@ put_le32(pb, 0); break; default: - av_abort(); + return -1; } end_tag(pb, strh); @@ -438,7 +438,7 @@ } break; default: - av_abort(); + return -1; } end_tag(pb, strf);
--- a/ffm.c Wed Sep 29 23:25:01 2004 +0000 +++ b/ffm.c Fri Oct 01 13:16:16 2004 +0000 @@ -190,7 +190,7 @@ put_le16(pb, codec->frame_size); break; default: - av_abort(); + return -1; } /* hack to have real time */ if (ffm_nopts) @@ -208,8 +208,7 @@ /* 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 @@ 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 @@ } 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;
--- a/mpeg.c Wed Sep 29 23:25:01 2004 +0000 +++ b/mpeg.c Fri Oct 01 13:16:16 2004 +0000 @@ -314,7 +314,7 @@ s->video_bound++; break; default: - av_abort(); + return -1; } } /* if no SCR, use first stream (audio) */
--- a/raw.c Wed Sep 29 23:25:01 2004 +0000 +++ b/raw.c Fri Oct 01 13:16:16 2004 +0000 @@ -557,7 +557,7 @@ packet_size = avpicture_get_size(st->codec.pix_fmt, width, height); if (packet_size < 0) - av_abort(); + return -1; if (av_new_packet(pkt, packet_size) < 0) return AVERROR_IO;