Browse Source

do not call (av_)abort()

Originally committed as revision 3544 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 21 years ago
parent
commit
71c32f19b3
6 changed files with 10 additions and 11 deletions
  1. +2
    -2
      libavformat/avienc.c
  2. +4
    -5
      libavformat/ffm.c
  3. +1
    -1
      libavformat/mpeg.c
  4. +1
    -1
      libavformat/raw.c
  5. +1
    -1
      libavformat/rm.c
  6. +1
    -1
      libavformat/yuv4mpeg.c

+ 2
- 2
libavformat/avienc.c View File

@@ -422,7 +422,7 @@ static int avi_write_header(AVFormatContext *s)
put_le32(pb, 0);
break;
default:
av_abort();
return -1;
}
end_tag(pb, strh);

@@ -438,7 +438,7 @@ static int avi_write_header(AVFormatContext *s)
}
break;
default:
av_abort();
return -1;
}
end_tag(pb, strf);


+ 4
- 5
libavformat/ffm.c View File

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


+ 1
- 1
libavformat/mpeg.c View File

@@ -314,7 +314,7 @@ static int mpeg_mux_init(AVFormatContext *ctx)
s->video_bound++;
break;
default:
av_abort();
return -1;
}
}
/* if no SCR, use first stream (audio) */


+ 1
- 1
libavformat/raw.c View File

@@ -557,7 +557,7 @@ static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt)

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;


+ 1
- 1
libavformat/rm.c View File

@@ -315,7 +315,7 @@ static int rm_write_header(AVFormatContext *s)
stream->total_frames = stream->nb_packets;
break;
default:
av_abort();
return -1;
}
}



+ 1
- 1
libavformat/yuv4mpeg.c View File

@@ -214,7 +214,7 @@ static int yuv4_read_packet(AVFormatContext *s, AVPacket *pkt)

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;


Loading…
Cancel
Save