Update blender-2.49b to support libav-0.7
authorLuca Barbato <lu_zero@gentoo.org>
Sun, 13 Nov 2011 07:19:54 +0000 (07:19 +0000)
committerLuca Barbato <lu_zero@gentoo.org>
Sun, 13 Nov 2011 07:19:54 +0000 (07:19 +0000)
Package-Manager: portage-2.1.10.34/cvs/Linux x86_64

media-gfx/blender/ChangeLog
media-gfx/blender/Manifest
media-gfx/blender/blender-2.49b-r2.ebuild
media-gfx/blender/files/blender-2.49b-libav-0.7.patch [new file with mode: 0644]

index ee1559e7db58d2110df7b2186cfc209637735c42..8cd577bddecd86155a22f3cc649624bd08f19857 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for media-gfx/blender
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/ChangeLog,v 1.208 2011/11/07 21:51:39 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/ChangeLog,v 1.209 2011/11/13 07:19:54 lu_zero Exp $
+
+  13 Nov 2011; Luca Barbato <lu_zero@gentoo.org> blender-2.49b-r2.ebuild,
+  +files/blender-2.49b-libav-0.7.patch:
+  Update blender-2.49b to support libav-0.7
 
   07 Nov 2011; Luca Barbato <lu_zero@gentoo.org> blender-2.57-r1.ebuild,
   +files/blender-2.57-enable_site_module.patch,
index b0d2c93d6bfda6c9707c6affd1983fb902dc6ac5..0f78746acb6d7dd7ecb0490cf1bf251b952ed59a 100644 (file)
@@ -9,6 +9,7 @@ AUX blender-2.49a-sys-openjpeg.patch 452 RMD160 7029b3d257839d4ca8ce58a9f8e46503
 AUX blender-2.49b-CVE-2009-3850-v3.patch 3891 RMD160 9a51681f426f1f87cc418b6316ce678025a93bbb SHA1 dc7baef8f0434e067f863e0a2c6ef0d8d9acc70b SHA256 5dc289f00ab59b13b7f1d3e8b4a77b8c9930460f8ee575b38a60da3577e2b1ba
 AUX blender-2.49b-CVE-2009-3850-v4.patch 5222 RMD160 1757323e4aa0ffa0e1b3ab14dcaa78188a39ae36 SHA1 5d432fbe575b1869a7e68e753e593edcc3478b35 SHA256 0707904cd3b627cfeac19d4d775ee4a019ba395251c9318dbb356e3b8de19124
 AUX blender-2.49b-insecure.desktop 223 RMD160 70719305e80334e805c73ccbd831243202ac65b6 SHA1 1633779552c5409f20f161e21b60a59417dad3cf SHA256 dfd0a438ebf792071fc9f12036f07b0f14277b2bf34050bf4d57ffceeff55555
+AUX blender-2.49b-libav-0.7.patch 15251 RMD160 c04ec7fc4fff2665c9b55f793e8995c0c0d64932 SHA1 9924e51d1ffee6af3ffe7aed5131f98f298e7b32 SHA256 636244001abc882887b7c72f665c751a86a96f355ec196a49390b8d13180cec5
 AUX blender-2.49b-subversion-1.7.patch 477 RMD160 0528267fd3f2d92f000855023b0fc8ed1e1e4ef7 SHA1 a02f988c8aaee76fc7586ca82c8f9d8329cdbb77 SHA256 744c7af5f0fdc24c84262748991c397b171c33246bb319ba5d3a54a4eda5da2a
 AUX blender-2.57-CVE-2009-3850-v1.patch 4894 RMD160 6680a3e54d8d65c050886d1601bfb8e022633425 SHA1 91ecd5bdfa69bb46b6688e1200aae0f90bc04b52 SHA256 d64afd9ddef2fc3796c0e0398bf8fecc96a18176945642b2ae3445da2de69a26
 AUX blender-2.57-CVE-2009-3850-v2.patch 8435 RMD160 07cbf22a258a31e6a1d050a6d13763f52ba50d66 SHA1 a1f969ba2ae85d1461f991043b66c372fc4d44c2 SHA256 a3d6d884d487604bdf9fc3ee78c8cf1fb10921ac0ec12ebd9d6e590093d9e98c
@@ -29,7 +30,7 @@ DIST blender-2.49b.tar.gz 22918377 RMD160 5b641de7b41af5e4186c9721b66eddc6870f9f
 DIST blender-2.57.tar.gz 16806453 RMD160 d2f4d14cb08067a3d1fb3c1661772cf8f3a9bfaa SHA1 c539e2640dfa2a17e044d0f296219b866242112a SHA256 8bd1812166f2dd96e158c1898a666adc1f9f109765d5cd7ff3a8adeae60794b8
 EBUILD blender-2.48a-r3.ebuild 4044 RMD160 831a9636988fb1a5ca9a406e45e6bf204511b609 SHA1 9b7b45cd51aa2057a1043d40223dd6a742282919 SHA256 5b677a561cb8c02ebb9527e78f9a11385d1e902602d0caa3d932e135f20af335
 EBUILD blender-2.49a.ebuild 4819 RMD160 109229feaf551d5c4829ecad0f4eb7c9cfea8c1e SHA1 3537ea47e3ccb11df14c321580559e04452bb7ee SHA256 67af33393f99caee9c451feb548d98836d2a0d75c714c253ec01416281339ed4
-EBUILD blender-2.49b-r2.ebuild 5005 RMD160 8b247b92bc630db8f6f49b73fd1a8b584eebe94a SHA1 a8b9ec81f68131dc7173849be7bf8d76be12a9f7 SHA256 929b7ce11ae8039327e001aef95b097058040e013ea2e0b1320b4921d48ba3f5
+EBUILD blender-2.49b-r2.ebuild 5050 RMD160 87bba6723e7f083f395666581f568848154c3233 SHA1 105297aa72047f8501775933f1d4b51bf992d60e SHA256 39dec297a537d22f07576adc90211ec8806f8d63c6c30906f58f6e51dc2cc764
 EBUILD blender-2.57-r1.ebuild 13957 RMD160 c1a41c1936954b9d2c2116ed128b84e338c06920 SHA1 72509eba4cddc3b92243cbf5b567bcaaae11bfb6 SHA256 84becdf04815fdecb50f7b32ba7df920eed3ad54700ba9312efb4c54a88e0933
-MISC ChangeLog 31721 RMD160 f64ca473b97379b2deff0756c6c917615cc2e31b SHA1 807f8851a7e474a7b49a822fa4b29a7d913682bd SHA256 9a290f188abf3f9687601041cc05450de17bb8f8b3b5cf01f0144eabadf2e7a7
+MISC ChangeLog 31880 RMD160 739d594984272b16dd4405777384ba5dd294e928 SHA1 9e2dc938bc06d836ca6ada1f451daafd0ef416ac SHA256 5e361d25958fd48c6aa878b8a1e9223d730d196b3f4d3823d732bb5551ebe69d
 MISC metadata.xml 1799 RMD160 7330ec5ccf7f7a86f31abf0b5f45bf84025c505a SHA1 a8bc4c5db954f24ea50e879b1bdbd5753430b3ee SHA256 f4bc849a0cc6a805fe6624699c5c1b9248336f7b879484f777f31b7c755759ea
index a90f561e148c4bb20cdaabfe05c5dcf79c9c4e9e..268980045140f70a5590155301e66e8287d4ab68 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.49b-r2.ebuild,v 1.11 2011/10/30 12:59:41 sping Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.49b-r2.ebuild,v 1.12 2011/11/13 07:19:54 lu_zero Exp $
 
 EAPI=2
 
@@ -59,6 +59,7 @@ src_prepare() {
        epatch "${FILESDIR}"/${PN}-2.49b-CVE-2009-3850-v4.patch
        epatch "${FILESDIR}"/${PN}-2.57-linux-3.patch  # Bug #381099
        epatch "${FILESDIR}"/${PN}-2.49b-subversion-1.7.patch
+       epatch "${FILESDIR}"/${P}-libav-0.7.patch
        rm -f "${S}/release/scripts/bpymodules/"*.pyc
 }
 
diff --git a/media-gfx/blender/files/blender-2.49b-libav-0.7.patch b/media-gfx/blender/files/blender-2.49b-libav-0.7.patch
new file mode 100644 (file)
index 0000000..d0661ad
--- /dev/null
@@ -0,0 +1,425 @@
+diff -urN blender-2.49b.orig//source/blender/blenkernel/intern/writeffmpeg.c blender-2.49b/source/blender/blenkernel/intern/writeffmpeg.c
+--- blender-2.49b.orig//source/blender/blenkernel/intern/writeffmpeg.c 2009-09-01 17:21:17.000000000 +0200
++++ blender-2.49b/source/blender/blenkernel/intern/writeffmpeg.c       2011-11-13 05:36:23.000000000 +0100
+@@ -32,6 +32,7 @@
+ #include <libavformat/avformat.h>
+ #include <libavcodec/avcodec.h>
+ #include <libavutil/rational.h>
++#include <libavutil/mathematics.h>
+ #include <libswscale/swscale.h>
+ #include <libavcodec/opt.h>
+ 
+@@ -149,10 +150,9 @@
+ #else
+       pkt.pts = c->coded_frame->pts;
+ #endif
+-      fprintf(stderr, "Audio Frame PTS: %lld\n", pkt.pts);
+ 
+       pkt.stream_index = audio_stream->index;
+-      pkt.flags |= PKT_FLAG_KEY;
++      pkt.flags |= AV_PKT_FLAG_KEY;
+       if (av_interleaved_write_frame(outfile, &pkt) != 0) {
+               error("Error writing audio packet");
+               return -1;
+@@ -271,7 +271,7 @@
+                       fprintf(stderr, "Video Frame PTS: not set\n");
+               }
+               if (c->coded_frame->key_frame)
+-                      packet.flags |= PKT_FLAG_KEY;
++                      packet.flags |= AV_PKT_FLAG_KEY;
+               packet.stream_index = video_stream->index;
+               packet.data = video_buffer;
+               packet.size = outsize;
+@@ -373,7 +373,7 @@
+       switch(prop->type) {
+       case IDP_STRING:
+               fprintf(stderr, "%s.\n", IDP_String(prop));
+-              rv = av_set_string(c, prop->name, IDP_String(prop));
++              av_set_string3(c, prop->name, IDP_String(prop), 0, &rv);
+               break;
+       case IDP_FLOAT:
+               fprintf(stderr, "%g.\n", IDP_Float(prop));
+@@ -384,12 +384,12 @@
+               
+               if (param) {
+                       if (IDP_Int(prop)) {
+-                              rv = av_set_string(c, name, param);
++                              av_set_string3(c, name, param, 0, &rv);
+                       } else {
+                               return;
+                       }
+               } else {
+-                      rv = av_set_int(c, prop->name, IDP_Int(prop));
++                      av_set_int(c, prop->name, IDP_Int(prop));
+               }
+               break;
+       }
+@@ -438,7 +438,7 @@
+       
+       c = get_codec_from_stream(st);
+       c->codec_id = codec_id;
+-      c->codec_type = CODEC_TYPE_VIDEO;
++      c->codec_type = AVMEDIA_TYPE_VIDEO;
+ 
+ 
+       /* Get some values from the current render settings */
+@@ -496,7 +496,7 @@
+               c->pix_fmt = PIX_FMT_YUV422P;
+       }
+ 
+-      if (codec_id == CODEC_ID_XVID) {
++      if (codec_id == CODEC_ID_MPEG4) {
+               /* arghhhh ... */
+               c->pix_fmt = PIX_FMT_YUV420P;
+       }
+@@ -557,7 +557,7 @@
+ 
+       c = get_codec_from_stream(st);
+       c->codec_id = codec_id;
+-      c->codec_type = CODEC_TYPE_AUDIO;
++      c->codec_type = AVMEDIA_TYPE_AUDIO;
+ 
+       c->sample_rate = G.scene->audio.mixrate;
+       c->bit_rate = ffmpeg_audio_bitrate*1000;
+@@ -652,14 +652,14 @@
+               error("No valid formats found");
+               return;
+       }
+-      fmt = guess_format(NULL, exts[0], NULL);
++      fmt = av_guess_format(NULL, exts[0], NULL);
+       if (!fmt) {
+               G.afbreek = 1; /* Abort render */
+               error("No valid formats found");
+               return;
+       }
+ 
+-      of = av_alloc_format_context();
++      of = avformat_alloc_context();
+       if (!of) {
+               G.afbreek = 1;
+               error("Error opening output file");
+@@ -699,7 +699,7 @@
+               fmt->video_codec = CODEC_ID_H264;
+               break;
+       case FFMPEG_XVID:
+-              fmt->video_codec = CODEC_ID_XVID;
++              fmt->video_codec = CODEC_ID_MPEG4;
+               break;
+       case FFMPEG_FLV:
+               fmt->video_codec = CODEC_ID_FLV1;
+diff -urN blender-2.49b.orig//source/blender/imbuf/intern/anim.c blender-2.49b/source/blender/imbuf/intern/anim.c
+--- blender-2.49b.orig//source/blender/imbuf/intern/anim.c     2009-09-01 17:21:50.000000000 +0200
++++ blender-2.49b/source/blender/imbuf/intern/anim.c   2011-11-13 06:21:37.000000000 +0100
+@@ -550,7 +550,7 @@
+       videoStream=-1;
+       for(i=0; i<pFormatCtx->nb_streams; i++)
+               if(get_codec_from_stream(pFormatCtx->streams[i])->codec_type
+-                 == CODEC_TYPE_VIDEO) {
++                 == AVMEDIA_TYPE_VIDEO)       {
+                       videoStream=i;
+                       break;
+               }
+@@ -683,10 +683,10 @@
+                   && position - (anim->curposition + 1) < anim->preseek) {
+                       while(av_read_frame(anim->pFormatCtx, &packet)>=0) {
+                               if (packet.stream_index == anim->videoStream) {
+-                                      avcodec_decode_video(
++                                      avcodec_decode_video2(
+                                               anim->pCodecCtx, 
+                                               anim->pFrame, &frameFinished, 
+-                                              packet.data, packet.size);
++                                              &packet);
+ 
+                                       if (frameFinished) {
+                                               anim->curposition++;
+@@ -741,9 +741,9 @@
+ 
+       while(av_read_frame(anim->pFormatCtx, &packet)>=0) {
+               if(packet.stream_index == anim->videoStream) {
+-                      avcodec_decode_video(anim->pCodecCtx, 
++                      avcodec_decode_video2(anim->pCodecCtx, 
+                                            anim->pFrame, &frameFinished, 
+-                                           packet.data, packet.size);
++                                           &packet);
+ 
+                       if (frameFinished && !pos_found) {
+                               if (packet.dts >= pts_to_search) {
+diff -urN blender-2.49b.orig//source/blender/imbuf/intern/util.c blender-2.49b/source/blender/imbuf/intern/util.c
+--- blender-2.49b.orig//source/blender/imbuf/intern/util.c     2009-09-01 17:21:50.000000000 +0200
++++ blender-2.49b/source/blender/imbuf/intern/util.c   2011-11-13 04:37:27.000000000 +0100
+@@ -324,7 +324,7 @@
+               return 0;
+       }
+ 
+-      if(UTIL_DEBUG) dump_format(pFormatCtx, 0, filename, 0);
++      if(UTIL_DEBUG) av_dump_format(pFormatCtx, 0, filename, 0);
+ 
+ 
+         /* Find the first video stream */
+@@ -332,7 +332,7 @@
+       for(i=0; i<pFormatCtx->nb_streams; i++)
+               if(pFormatCtx->streams[i] &&
+                  get_codec_from_stream(pFormatCtx->streams[i]) && 
+-                (get_codec_from_stream(pFormatCtx->streams[i])->codec_type==CODEC_TYPE_VIDEO))
++                (get_codec_from_stream(pFormatCtx->streams[i])->codec_type==AVMEDIA_TYPE_VIDEO))
+               {
+                       videoStream=i;
+                       break;
+Binary files blender-2.49b.orig//source/blender/python/api2_2x/BGL.o and blender-2.49b/source/blender/python/api2_2x/BGL.o differ
+Binary files blender-2.49b.orig//source/blender/python/api2_2x/bpy_internal_import.o and blender-2.49b/source/blender/python/api2_2x/bpy_internal_import.o differ
+Binary files blender-2.49b.orig//source/blender/python/api2_2x/constant.o and blender-2.49b/source/blender/python/api2_2x/constant.o differ
+Binary files blender-2.49b.orig//source/blender/python/api2_2x/euler.o and blender-2.49b/source/blender/python/api2_2x/euler.o differ
+Binary files blender-2.49b.orig//source/blender/python/api2_2x/Geometry.o and blender-2.49b/source/blender/python/api2_2x/Geometry.o differ
+Binary files blender-2.49b.orig//source/blender/python/api2_2x/Mathutils.o and blender-2.49b/source/blender/python/api2_2x/Mathutils.o differ
+Binary files blender-2.49b.orig//source/blender/python/api2_2x/matrix.o and blender-2.49b/source/blender/python/api2_2x/matrix.o differ
+Binary files blender-2.49b.orig//source/blender/python/api2_2x/quat.o and blender-2.49b/source/blender/python/api2_2x/quat.o differ
+Binary files blender-2.49b.orig//source/blender/python/api2_2x/vector.o and blender-2.49b/source/blender/python/api2_2x/vector.o differ
+diff -urN blender-2.49b.orig//source/blender/src/buttons_scene.c blender-2.49b/source/blender/src/buttons_scene.c
+--- blender-2.49b.orig//source/blender/src/buttons_scene.c     2009-09-01 17:21:46.000000000 +0200
++++ blender-2.49b/source/blender/src/buttons_scene.c   2011-11-13 05:38:04.000000000 +0100
+@@ -2169,7 +2169,7 @@
+                "Quicktime", FFMPEG_MOV,
+                "DV", FFMPEG_DV,
+              "H264", FFMPEG_H264,
+-             "XVid", FFMPEG_XVID,
++               "XVID", FFMPEG_XVID,
+ #if 0 
+ /* ifdef WITH_OGG, disabled, since broken within ffmpeg bundled with blender */
+              "OGG", FFMPEG_OGG,
+@@ -2212,7 +2212,7 @@
+                "HuffYUV", CODEC_ID_HUFFYUV,
+              "DV", CODEC_ID_DVVIDEO,
+                "H264", CODEC_ID_H264,
+-             "XVid", CODEC_ID_XVID,
++             "XVid", CODEC_ID_MPEG4,
+ #ifdef WITH_OGG
+              "Theora", CODEC_ID_THEORA,
+ #endif
+@@ -2723,12 +2723,12 @@
+       switch (o->type) {
+       case FF_OPT_TYPE_INT:
+       case FF_OPT_TYPE_INT64:
+-              val.i = o->default_val;
++              val.i = o->default_val.dbl;
+               idp_type = IDP_INT;
+               break;
+       case FF_OPT_TYPE_DOUBLE:
+       case FF_OPT_TYPE_FLOAT:
+-              val.f = o->default_val;
++              val.f = o->default_val.dbl;
+               idp_type = IDP_FLOAT;
+               break;
+       case FF_OPT_TYPE_STRING:
+diff -urN blender-2.49b.orig//source/blender/src/hddaudio.c blender-2.49b/source/blender/src/hddaudio.c
+--- blender-2.49b.orig//source/blender/src/hddaudio.c  2009-09-01 17:21:45.000000000 +0200
++++ blender-2.49b/source/blender/src/hddaudio.c        2011-11-13 06:27:23.000000000 +0100
+@@ -126,7 +126,7 @@
+       audioStream=-1;
+       for(i=0; i<pFormatCtx->nb_streams; i++)
+               if(get_codec_from_stream(pFormatCtx->streams[i])
+-                 ->codec_type == CODEC_TYPE_AUDIO)
++                 ->codec_type == AVMEDIA_TYPE_AUDIO)
+               {
+                       audioStream=i;
+                       break;
+@@ -382,39 +382,30 @@
+                                       continue;
+                               }
+ 
+-                              audio_pkt_data = packet.data;
+-                              audio_pkt_size = packet.size;
+-
+-                              while (audio_pkt_size > 0) {
+-                                      data_size=AVCODEC_MAX_AUDIO_FRAME_SIZE;
+-                                      len = avcodec_decode_audio2(
+-                                              hdaudio->pCodecCtx, 
+-                                              hdaudio->decode_cache 
+-                                              + decode_pos 
+-                                              * hdaudio->decode_sample_format_size, 
+-                                              &data_size, 
+-                                              audio_pkt_data, 
+-                                              audio_pkt_size);
+-                                      if (len <= 0) {
+-                                              audio_pkt_size = 0;
+-                                              break;
+-                                      }
+-                                      
+-                                      audio_pkt_size -= len;
+-                                      audio_pkt_data += len;
+-                                      
+-                                      if (data_size <= 0) {
+-                                              continue;
+-                                      }
+-                                      
+-                                      decode_pos += data_size 
+-                                              / hdaudio->decode_sample_format_size;
+-                                      if (decode_pos + data_size
+-                                          / hdaudio->decode_sample_format_size
+-                                          > hdaudio->decode_cache_size) {
+-                                              break;
+-                                      }
+-                              }
++                                data_size=AVCODEC_MAX_AUDIO_FRAME_SIZE;
++                                len = avcodec_decode_audio3(
++                                        hdaudio->pCodecCtx, 
++                                        hdaudio->decode_cache 
++                                        + decode_pos 
++                                        * hdaudio->decode_sample_format_size, 
++                                        &data_size, 
++                                        &packet);
++                                if (len <= 0) {
++                                        audio_pkt_size = 0;
++                                        break;
++                                }
++                                
++                                if (data_size <= 0) {
++                                        continue;
++                                }
++                                
++                                decode_pos += data_size 
++                                        / hdaudio->decode_sample_format_size;
++                                if (decode_pos + data_size
++                                    / hdaudio->decode_sample_format_size
++                                    > hdaudio->decode_cache_size) {
++                                        break;
++                                }
+                               av_free_packet(&packet);
+                               
+                               if (decode_pos + data_size / hdaudio->decode_sample_format_size
+@@ -534,36 +525,29 @@
+                               decode_cache_zero_init = 1;
+                       }
+ 
+-                      while (audio_pkt_size > 0) {
+-                              data_size=AVCODEC_MAX_AUDIO_FRAME_SIZE;
+-                              len = avcodec_decode_audio2(
+-                                      hdaudio->pCodecCtx, 
+-                                      hdaudio->decode_cache 
+-                                      + decode_pos 
+-                                      * hdaudio->decode_sample_format_size, 
+-                                      &data_size, 
+-                                      audio_pkt_data, 
+-                                      audio_pkt_size);
+-                              if (len <= 0) {
+-                                      audio_pkt_size = 0;
+-                                      break;
+-                              }
+-                              
+-                              audio_pkt_size -= len;
+-                              audio_pkt_data += len;
+-
+-                              if (data_size <= 0) {
+-                                      continue;
+-                              }
+-                              
+-                              decode_pos += data_size 
+-                                      / hdaudio->decode_sample_format_size;
+-                              if (decode_pos + data_size
+-                                  / hdaudio->decode_sample_format_size
+-                                  > hdaudio->decode_cache_size) {
+-                                      break;
+-                              }
+-                      }
++                        data_size=AVCODEC_MAX_AUDIO_FRAME_SIZE;
++                        len = avcodec_decode_audio3(
++                                hdaudio->pCodecCtx, 
++                                hdaudio->decode_cache 
++                                + decode_pos 
++                                * hdaudio->decode_sample_format_size, 
++                                &data_size, 
++                                &packet);
++                        if (len <= 0) {
++                                break;
++                        }
++
++                        if (data_size <= 0) {
++                                continue;
++                        }
++                        
++                        decode_pos += data_size 
++                                / hdaudio->decode_sample_format_size;
++                        if (decode_pos + data_size
++                            / hdaudio->decode_sample_format_size
++                            > hdaudio->decode_cache_size) {
++                                break;
++                        }
+       
+                       av_free_packet(&packet);
+ 
+diff -urN blender-2.49b.orig//source/gameengine/VideoTexture/VideoFFmpeg.cpp blender-2.49b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
+--- blender-2.49b.orig//source/gameengine/VideoTexture/VideoFFmpeg.cpp 2009-09-01 17:20:53.000000000 +0200
++++ blender-2.49b/source/gameengine/VideoTexture/VideoFFmpeg.cpp       2011-11-13 07:56:56.000000000 +0100
+@@ -26,7 +26,6 @@
+ #define __STDC_CONSTANT_MACROS
+ #include <stdint.h>
+ 
+-
+ #include "MEM_guardedalloc.h"
+ #include "PIL_time.h"
+ 
+@@ -177,7 +176,7 @@
+       {
+               if(formatCtx->streams[i] &&
+                       get_codec_from_stream(formatCtx->streams[i]) && 
+-                      (get_codec_from_stream(formatCtx->streams[i])->codec_type==CODEC_TYPE_VIDEO))
++                      (get_codec_from_stream(formatCtx->streams[i])->codec_type==AVMEDIA_TYPE_VIDEO))
+               {
+                       videoStream=i;
+                       break;
+@@ -358,9 +357,9 @@
+                               BLI_remlink(&video->m_packetCacheBase, cachePacket);
+                               // use m_frame because when caching, it is not used in main thread
+                               // we can't use currentFrame directly because we need to convert to RGB first
+-                              avcodec_decode_video(video->m_codecCtx, 
++                              avcodec_decode_video2(video->m_codecCtx, 
+                                       video->m_frame, &frameFinished, 
+-                                      cachePacket->packet.data, cachePacket->packet.size);
++                                      &cachePacket->packet);
+                               if(frameFinished) 
+                               {
+                                       AVFrame * input = video->m_frame;
+@@ -628,7 +627,7 @@
+       if (m_captRate <= 0.f)
+               m_captRate = defFrameRate;
+       sprintf(rateStr, "%f", m_captRate);
+-      av_parse_video_frame_rate(&frameRate, rateStr);
++      av_parse_video_rate(&frameRate, rateStr);
+       // populate format parameters
+       // need to specify the time base = inverse of rate
+       formatParams.time_base.num = frameRate.den;
+@@ -887,10 +886,10 @@
+                       {
+                               if (packet.stream_index == m_videoStream) 
+                               {
+-                                      avcodec_decode_video(
++                                      avcodec_decode_video2(
+                                               m_codecCtx, 
+                                               m_frame, &frameFinished, 
+-                                              packet.data, packet.size);
++                                              &packet);
+                                       if (frameFinished)
+                                               m_curPosition++;
+                               }
+@@ -966,9 +965,9 @@
+       {
+               if(packet.stream_index == m_videoStream) 
+               {
+-                      avcodec_decode_video(m_codecCtx, 
++                      avcodec_decode_video2(m_codecCtx, 
+                               m_frame, &frameFinished, 
+-                              packet.data, packet.size);
++                              &packet);
+ 
+                       if (frameFinished && !posFound) 
+                       {
+diff -urN blender-2.49b.orig//source/gameengine/VideoTexture/VideoFFmpeg.h blender-2.49b/source/gameengine/VideoTexture/VideoFFmpeg.h
+--- blender-2.49b.orig//source/gameengine/VideoTexture/VideoFFmpeg.h   2009-09-01 17:20:53.000000000 +0200
++++ blender-2.49b/source/gameengine/VideoTexture/VideoFFmpeg.h 2011-11-13 08:03:51.000000000 +0100
+@@ -28,6 +28,7 @@
+ #include <libavformat/avformat.h>
+ #include <libavcodec/avcodec.h>
+ #include <libavutil/rational.h>
++#include <libavutil/parseutils.h>
+ #include <libswscale/swscale.h>
+ #include "DNA_listBase.h"
+ #include "BLI_threads.h"