patch by Ronald S. Bultje: [rsbultje gmail com] original thread: [FFmpeg-devel] ffmpeg.c/cmdutils.c compilation date: 06/23/2007 03:15 AM Originally committed as revision 9453 to svn://svn.ffmpeg.org/ffmpeg/trunktags/v0.5
@@ -19,6 +19,10 @@ | |||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||||
*/ | */ | ||||
#include <string.h> | |||||
#include <stdlib.h> | |||||
#include <errno.h> | |||||
#include "avformat.h" | #include "avformat.h" | ||||
#include "cmdutils.h" | #include "cmdutils.h" | ||||
#include "avstring.h" | #include "avstring.h" | ||||
@@ -19,6 +19,12 @@ | |||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||||
*/ | */ | ||||
#include "config.h" | |||||
#include <ctype.h> | |||||
#include <string.h> | |||||
#include <math.h> | |||||
#include <stdlib.h> | |||||
#include <errno.h> | |||||
#include <signal.h> | #include <signal.h> | ||||
#include <limits.h> | #include <limits.h> | ||||
#include "avformat.h" | #include "avformat.h" | ||||
@@ -1199,7 +1205,7 @@ static int output_packet(AVInputStream *ist, int ist_index, | |||||
pkt->pts); | pkt->pts); | ||||
break; | break; | ||||
default: | default: | ||||
av_abort(); | |||||
abort(); | |||||
} | } | ||||
} else { | } else { | ||||
AVFrame avframe; //FIXME/XXX remove this | AVFrame avframe; //FIXME/XXX remove this | ||||
@@ -1535,7 +1541,7 @@ static int av_encode(AVFormatContext **output_files, | |||||
case CODEC_TYPE_SUBTITLE: | case CODEC_TYPE_SUBTITLE: | ||||
break; | break; | ||||
default: | default: | ||||
av_abort(); | |||||
abort(); | |||||
} | } | ||||
} else { | } else { | ||||
switch(codec->codec_type) { | switch(codec->codec_type) { | ||||
@@ -1571,7 +1577,7 @@ static int av_encode(AVFormatContext **output_files, | |||||
codec->sample_rate, icodec->sample_rate); | codec->sample_rate, icodec->sample_rate); | ||||
if(!ost->resample){ | if(!ost->resample){ | ||||
printf("Can't resample. Aborting.\n"); | printf("Can't resample. Aborting.\n"); | ||||
av_abort(); | |||||
abort(); | |||||
} | } | ||||
} | } | ||||
ist->decoding_needed = 1; | ist->decoding_needed = 1; | ||||
@@ -1633,7 +1639,7 @@ static int av_encode(AVFormatContext **output_files, | |||||
ist->decoding_needed = 1; | ist->decoding_needed = 1; | ||||
break; | break; | ||||
default: | default: | ||||
av_abort(); | |||||
abort(); | |||||
break; | break; | ||||
} | } | ||||
/* two pass mode */ | /* two pass mode */ | ||||
@@ -2644,7 +2650,7 @@ static void opt_input_file(const char *filename) | |||||
case CODEC_TYPE_UNKNOWN: | case CODEC_TYPE_UNKNOWN: | ||||
break; | break; | ||||
default: | default: | ||||
av_abort(); | |||||
abort(); | |||||
} | } | ||||
} | } | ||||
@@ -2686,7 +2692,7 @@ static void check_audio_video_inputs(int *has_video_ptr, int *has_audio_ptr) | |||||
case CODEC_TYPE_SUBTITLE: | case CODEC_TYPE_SUBTITLE: | ||||
break; | break; | ||||
default: | default: | ||||
av_abort(); | |||||
abort(); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -19,6 +19,8 @@ | |||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||||
*/ | */ | ||||
#include <math.h> | |||||
#include <limits.h> | |||||
#include "avformat.h" | #include "avformat.h" | ||||
#include "swscale.h" | #include "swscale.h" | ||||
#include "avstring.h" | #include "avstring.h" | ||||
@@ -19,6 +19,13 @@ | |||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||||
*/ | */ | ||||
#include "config.h" | |||||
#if HAVE_CLOSESOCKET != 1 | |||||
#define closesocket close | |||||
#endif | |||||
#include <string.h> | |||||
#include <stdlib.h> | |||||
#include <sys/poll.h> | |||||
#include "avformat.h" | #include "avformat.h" | ||||
#include <stdarg.h> | #include <stdarg.h> | ||||
@@ -1432,7 +1439,7 @@ static int http_parse_request(HTTPContext *c) | |||||
} | } | ||||
break; | break; | ||||
default: | default: | ||||
av_abort(); | |||||
abort(); | |||||
break; | break; | ||||
} | } | ||||
@@ -1695,7 +1702,7 @@ static void compute_stats(HTTPContext *c) | |||||
video_bit_rate += st->codec->bit_rate; | video_bit_rate += st->codec->bit_rate; | ||||
break; | break; | ||||
default: | default: | ||||
av_abort(); | |||||
abort(); | |||||
} | } | ||||
} | } | ||||
url_fprintf(pb, "<TD align=center> %s <TD align=right> %d <TD align=right> %d <TD> %s %s <TD align=right> %d <TD> %s %s", | url_fprintf(pb, "<TD align=center> %s <TD align=right> %d <TD align=right> %d <TD> %s %s <TD align=right> %d <TD> %s %s", | ||||
@@ -1775,7 +1782,7 @@ static void compute_stats(HTTPContext *c) | |||||
st->codec->qmin, st->codec->qmax, st->codec->time_base.den / st->codec->time_base.num); | st->codec->qmin, st->codec->qmax, st->codec->time_base.den / st->codec->time_base.num); | ||||
break; | break; | ||||
default: | default: | ||||
av_abort(); | |||||
abort(); | |||||
} | } | ||||
url_fprintf(pb, "<tr><td align=right>%d<td>%s<td align=right>%d<td>%s<td>%s\n", | url_fprintf(pb, "<tr><td align=right>%d<td>%s<td align=right>%d<td>%s<td>%s\n", | ||||
i, type, st->codec->bit_rate/1000, codec ? codec->name : "", parameters); | i, type, st->codec->bit_rate/1000, codec ? codec->name : "", parameters); | ||||
@@ -3302,7 +3309,7 @@ static int add_av_stream(FFStream *feed, AVStream *st) | |||||
goto found; | goto found; | ||||
break; | break; | ||||
default: | default: | ||||
av_abort(); | |||||
abort(); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -3703,7 +3710,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av) | |||||
break; | break; | ||||
default: | default: | ||||
av_abort(); | |||||
abort(); | |||||
} | } | ||||
st = av_mallocz(sizeof(AVStream)); | st = av_mallocz(sizeof(AVStream)); | ||||