@@ -1,2721 +0,0 @@
-diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ff_audio_decoder.c xine-lib-1.1.8/src/libffmpeg/ff_audio_decoder.c
---- xine-lib-1.1.8.orig/src/libffmpeg/ff_audio_decoder.c 2007-08-19 01:36:49.000000000 +0200
-+++ xine-lib-1.1.8/src/libffmpeg/ff_audio_decoder.c 2007-11-11 00:31:03.000000000 +0100
-@@ -15,12 +15,9 @@
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-- *
-- * $Id: audio_decoder.c,v 1.33 2007/01/28 18:38:33 miguelfreitas Exp $
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- * xine audio decoder plugin using ffmpeg
-- *
- */
-
- #ifdef HAVE_CONFIG_H
-diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ff_dvaudio_decoder.c xine-lib-1.1.8/src/libffmpeg/ff_dvaudio_decoder.c
---- xine-lib-1.1.8.orig/src/libffmpeg/ff_dvaudio_decoder.c 2007-08-19 01:36:49.000000000 +0200
-+++ xine-lib-1.1.8/src/libffmpeg/ff_dvaudio_decoder.c 2007-11-11 00:31:03.000000000 +0100
-@@ -15,12 +15,9 @@
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-- *
-- * $Id: dvaudio_decoder.c,v 1.12 2006/12/04 22:25:13 miguelfreitas Exp $
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- * dv audio decoder based on patch by Dan Dennedy <dan@dennedy.org>
-- *
- */
-
- #ifdef HAVE_CONFIG_H
-diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ffmpeg_decoder.c xine-lib-1.1.8/src/libffmpeg/ffmpeg_decoder.c
---- xine-lib-1.1.8.orig/src/libffmpeg/ffmpeg_decoder.c 2007-08-19 01:36:50.000000000 +0200
-+++ xine-lib-1.1.8/src/libffmpeg/ffmpeg_decoder.c 2007-11-11 00:31:03.000000000 +0100
-@@ -15,12 +15,9 @@
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-- *
-- * $Id: xine_decoder.c,v 1.173 2007/01/13 21:19:52 miguelfreitas Exp $
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- * xine decoder plugin using ffmpeg
-- *
- */
-
- #ifdef HAVE_CONFIG_H
-diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ffmpeg_decoder.h xine-lib-1.1.8/src/libffmpeg/ffmpeg_decoder.h
---- xine-lib-1.1.8.orig/src/libffmpeg/ffmpeg_decoder.h 2007-08-19 01:36:50.000000000 +0200
-+++ xine-lib-1.1.8/src/libffmpeg/ffmpeg_decoder.h 2007-11-11 00:31:03.000000000 +0100
-@@ -15,10 +15,7 @@
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-- *
-- * $Id: xine_decoder.h,v 1.7 2006/08/02 07:15:27 tmmm Exp $
-- *
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- */
-
- #ifndef HAVE_XINE_DECODER_H
-diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ffmpeg_encoder.c xine-lib-1.1.8/src/libffmpeg/ffmpeg_encoder.c
---- xine-lib-1.1.8.orig/src/libffmpeg/ffmpeg_encoder.c 2007-08-19 01:36:50.000000000 +0200
-+++ xine-lib-1.1.8/src/libffmpeg/ffmpeg_encoder.c 2007-12-07 19:26:33.000000000 +0100
-@@ -15,9 +15,7 @@
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-- *
-- * $Id: xine_encoder.c,v 1.25 2006/07/10 22:08:29 dgp85 Exp $
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- */
-
- /* mpeg encoders for the dxr3 video out plugin. */
-@@ -76,7 +74,7 @@
- lavc_data_t* this;
- avcodec_init();
-
-- register_avcodec(&mpeg1video_encoder);
-+ avcodec_register_all();
- lprintf("lavc init , version %x\n", avcodec_version());
- this = xine_xmalloc(sizeof(lavc_data_t));
- if (!this) return 0;
-diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ff_mpeg_parser.c xine-lib-1.1.8/src/libffmpeg/ff_mpeg_parser.c
---- xine-lib-1.1.8.orig/src/libffmpeg/ff_mpeg_parser.c 2007-08-19 01:36:49.000000000 +0200
-+++ xine-lib-1.1.8/src/libffmpeg/ff_mpeg_parser.c 2007-11-11 00:31:03.000000000 +0100
-@@ -15,12 +15,10 @@
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- * Simple MPEG-ES parser/framer by Thibaut Mattern (tmattern@noos.fr)
- * based on libmpeg2 decoder.
-- *
-- * $Id: mpeg_parser.c,v 1.7 2007/03/29 18:52:45 dgp85 Exp $
- */
- #define LOG_MODULE "mpeg_parser"
- #define LOG_VERBOSE
-diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ff_mpeg_parser.h xine-lib-1.1.8/src/libffmpeg/ff_mpeg_parser.h
---- xine-lib-1.1.8.orig/src/libffmpeg/ff_mpeg_parser.h 2007-08-19 01:36:49.000000000 +0200
-+++ xine-lib-1.1.8/src/libffmpeg/ff_mpeg_parser.h 2007-11-11 00:31:03.000000000 +0100
-@@ -15,12 +15,10 @@
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- * Simple MPEG-ES parser/framer by Thibaut Mattern (tmattern@noos.fr)
- * based on libmpeg2 decoder.
-- *
-- * $Id: mpeg_parser.h,v 1.5 2007/03/29 18:52:45 dgp85 Exp $
- */
- #ifndef HAVE_MPEG_PARSER_H
- #define HAVE_MPEG_PARSER_H
-diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ff_video_decoder.c xine-lib-1.1.8/src/libffmpeg/ff_video_decoder.c
---- xine-lib-1.1.8.orig/src/libffmpeg/ff_video_decoder.c 2007-08-19 01:36:49.000000000 +0200
-+++ xine-lib-1.1.8/src/libffmpeg/ff_video_decoder.c 2007-12-09 16:35:05.000000000 +0100
-@@ -15,12 +15,9 @@
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-- *
-- * $Id: video_decoder.c,v 1.73 2007/03/29 18:41:02 dgp85 Exp $
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- * xine video decoder plugin using ffmpeg
-- *
- */
-
- #ifdef HAVE_CONFIG_H
-@@ -67,6 +64,7 @@
- video_decoder_class_t decoder_class;
-
- int pp_quality;
-+ int thread_count;
-
- xine_t *xine;
- } ff_video_class_t;
-@@ -87,6 +85,7 @@
- uint8_t yuv_init:1;
- uint8_t is_direct_rendering_disabled:1;
- uint8_t cs_convert_init:1;
-+ uint8_t assume_bad_field_picture:1;
-
- xine_bmiheader bih;
- unsigned char *buf;
-@@ -216,12 +215,14 @@
- ff_video_decoder_t *this = (ff_video_decoder_t *)context->opaque;
-
- if (av_frame->type == FF_BUFFER_TYPE_USER) {
-- vo_frame_t *img = (vo_frame_t *)av_frame->opaque;
-+ if ( av_frame->opaque ) {
-+ vo_frame_t *img = (vo_frame_t *)av_frame->opaque;
-+
-+ img->free(img);
-+ }
-+
- xine_list_iterator_t it;
-
-- assert(av_frame->opaque);
-- img->free(img);
--
- it = xine_list_find(this->dr1_frames, av_frame);
- assert(it);
- if( it != NULL )
-@@ -244,6 +245,7 @@
- {BUF_VIDEO_WMV7, CODEC_ID_WMV1, "MS Windows Media Video 7 (ffmpeg)"},
- {BUF_VIDEO_WMV8, CODEC_ID_WMV2, "MS Windows Media Video 8 (ffmpeg)"},
- {BUF_VIDEO_WMV9, CODEC_ID_WMV3, "MS Windows Media Video 9 (ffmpeg)"},
-+ {BUF_VIDEO_VC1, CODEC_ID_VC1, "MS Windows Media Video VC-1 (ffmpeg)"},
- {BUF_VIDEO_MPEG4, CODEC_ID_MPEG4, "ISO MPEG-4 (ffmpeg)"},
- {BUF_VIDEO_XVID, CODEC_ID_MPEG4, "ISO MPEG-4 (XviD, ffmpeg)"},
- {BUF_VIDEO_DIVX5, CODEC_ID_MPEG4, "ISO MPEG-4 (DivX5, ffmpeg)"},
-@@ -368,6 +370,12 @@
- _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0);
- return;
- }
-+
-+ if (this->class->thread_count > 1) {
-+ avcodec_thread_init(this->context, this->class->thread_count);
-+ this->context->thread_count = this->class->thread_count;
-+ }
-+
- pthread_mutex_unlock(&ffmpeg_lock);
-
- lprintf("lavc decoder opened\n");
-@@ -418,10 +426,19 @@
- case BUF_VIDEO_HUFFYUV:
- this->frame_flags |= VO_INTERLACED_FLAG;
|