From a4d309341dbcd3c28ee68e818c1d5ef54114adf8 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 6 Nov 2011 23:15:07 +0000 Subject: Sun Nov 6 23:15:07 UTC 2011 --- community-testing/xvidcap/xvidcap-ffmpeg.patch | 105 +++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 community-testing/xvidcap/xvidcap-ffmpeg.patch (limited to 'community-testing/xvidcap/xvidcap-ffmpeg.patch') diff --git a/community-testing/xvidcap/xvidcap-ffmpeg.patch b/community-testing/xvidcap/xvidcap-ffmpeg.patch new file mode 100644 index 000000000..3a74bf508 --- /dev/null +++ b/community-testing/xvidcap/xvidcap-ffmpeg.patch @@ -0,0 +1,105 @@ +Index: src/codecs.c +=================================================================== +--- src/codecs.c (revision 319) ++++ src/codecs.c (working copy) +@@ -43,8 +43,8 @@ + #include + + #ifdef USE_FFMPEG +-#include +-#include ++#include ++#include + #endif // USE_FFMPEG + + #include "app_data.h" +Index: src/xtoffmpeg.c +=================================================================== +--- src/xtoffmpeg.c (revision 319) ++++ src/xtoffmpeg.c (working copy) +@@ -56,13 +56,13 @@ + #include "xvidcap-intl.h" + + // ffmpeg stuff +-#include +-#include +-#include ++#include ++#include ++#include + //#include +-#include +-#include +-#include ++#include ++#include ++#include + #define swscale_isRGB(x) ((x)==PIX_FMT_BGR32 || (x)==PIX_FMT_RGB24 \ + || (x)==PIX_FMT_RGB565 || (x)==PIX_FMT_RGB555 \ + || (x)==PIX_FMT_RGB8 || (x)==PIX_FMT_RGB4 \ +@@ -96,9 +96,10 @@ + || (x)==PIX_FMT_YUVJ420P || (x)==PIX_FMT_YUVJ422P \ + || (x)==PIX_FMT_YUVJ444P) + +-#define PIX_FMT_ARGB32 PIX_FMT_RGBA32 /* this is just my personal +- * convenience */ ++#define PIX_FMT_ARGB32 PIX_FMT_RGB32 /* this is just my personal ++ * convenience */ + ++ + /* + * file globals + */ +@@ -1248,7 +1249,11 @@ + st->codec->flags |= CODEC_FLAG2_FAST; + // there is no trellis quantiser in libav* for mjpeg + if (st->codec->codec_id != CODEC_ID_MJPEG) ++#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0) + st->codec->flags |= CODEC_FLAG_TRELLIS_QUANT; ++#else ++ st->codec->trellis = 1; ++#endif + st->codec->flags &= ~CODEC_FLAG_OBMC; + // some formats want stream headers to be seperate + if (oc->oformat->flags & AVFMT_GLOBALHEADER) +@@ -1498,11 +1503,10 @@ + // add the video stream and initialize the codecs + // + // prepare stream +- out_st = +- add_video_stream (output_file, image, +- (input_pixfmt == +- PIX_FMT_PAL8 ? PIX_FMT_RGB24 : input_pixfmt), +- xvc_codecs[job->targetCodec].ffmpeg_id, job); ++ fprintf(stderr, "The current pixfmt is %d, but the choosen one is %d\n", input_pixfmt, (input_pixfmt == PIX_FMT_PAL8 ? PIX_FMT_RGB24 : input_pixfmt)); ++ out_st = add_video_stream (output_file, image, ++ (input_pixfmt == PIX_FMT_PAL8 ? PIX_FMT_RGB24 : input_pixfmt), ++ xvc_codecs[job->targetCodec].ffmpeg_id, job); + + // FIXME: set params + // memset (p_fParams, 0, sizeof(*p_fParams)); +Index: src/main.c +=================================================================== +--- src/main.c (revision 319) ++++ src/main.c (working copy) +@@ -45,7 +45,7 @@ + #include + + #ifdef USE_FFMPEG +-#include ++#include + #endif // USE_FFMPEG + + #include "control.h" +@@ -217,9 +217,6 @@ + + if (app) + xvc_appdata_free (app); +-#ifdef USE_FFMPEG +- av_free_static (); +-#endif + } + + /** + + -- cgit v1.2.3-54-g00ecf