X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=output_example.c;h=515a172661103956825b9597e6aed1bd9fdf6565;hb=63b737d4f9c118853a4f8d9af641335629bdf3ab;hp=7f75b76f23ffab591f621147824d564c9415ea98;hpb=5d915e827e994ccab376c30d18e3f12c74b8cb17;p=ffmpeg diff --git a/output_example.c b/output_example.c index 7f75b76f23f..515a1726611 100644 --- a/output_example.c +++ b/output_example.c @@ -28,11 +28,13 @@ #include #ifndef M_PI -#define M_PI 3.1415926535897931 +#define M_PI 3.14159265358979323846 #endif -#include "avformat.h" -#include "swscale.h" +#include "libavformat/avformat.h" +#include "libswscale/swscale.h" + +#undef exit /* 5 seconds stream duration */ #define STREAM_DURATION 5.0 @@ -215,12 +217,12 @@ static AVStream *add_video_stream(AVFormatContext *oc, int codec_id) c->max_b_frames = 2; } if (c->codec_id == CODEC_ID_MPEG1VIDEO){ - /* needed to avoid using macroblocks in which some coeffs overflow - this doesnt happen with normal video, it just happens here as the - motion of the chroma plane doesnt match the luma plane */ + /* Needed to avoid using macroblocks in which some coeffs overflow. + This does not happen with normal video, it just happens here as + the motion of the chroma plane does not match the luma plane. */ c->mb_decision=2; } - // some formats want stream headers to be seperate + // some formats want stream headers to be separate if(!strcmp(oc->oformat->name, "mp4") || !strcmp(oc->oformat->name, "mov") || !strcmp(oc->oformat->name, "3gp")) c->flags |= CODEC_FLAG_GLOBAL_HEADER; @@ -536,7 +538,7 @@ int main(int argc, char **argv) if (!(fmt->flags & AVFMT_NOFILE)) { /* close the output file */ - url_fclose(&oc->pb); + url_fclose(oc->pb); } /* free the stream */