packages: xine-lib/xine-lib.spec, xine-lib/xine-lib-ffmpeg-0.8.patch (NEW) ...

qboosh qboosh at pld-linux.org
Mon Jun 27 22:03:08 CEST 2011


Author: qboosh                       Date: Mon Jun 27 20:03:08 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- added ffmpeg-0.8 patch

---- Files affected:
packages/xine-lib:
   xine-lib.spec (1.282 -> 1.283) , xine-lib-ffmpeg-0.8.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/xine-lib/xine-lib.spec
diff -u packages/xine-lib/xine-lib.spec:1.282 packages/xine-lib/xine-lib.spec:1.283
--- packages/xine-lib/xine-lib.spec:1.282	Mon Jun 27 11:56:44 2011
+++ packages/xine-lib/xine-lib.spec	Mon Jun 27 22:02:59 2011
@@ -54,6 +54,7 @@
 Patch4:		%{name}-vdr.patch
 Patch5:		%{name}-ac.patch
 Patch6:		%{name}-xxmc.patch
+Patch7:		%{name}-ffmpeg-0.8.patch
 URL:		http://xine.sourceforge.net/
 %{?with_directfb:BuildRequires:	DirectFB-devel >= 0.9.22}
 %{?with_fusionsound:BuildRequires:	FusionSound-devel >= 0.9.23}
@@ -67,7 +68,7 @@
 BuildRequires:	automake >= 1:1.8.1
 %{?with_esd:BuildRequires:	esound-devel >= 0.2.8}
 BuildRequires:	faad2-devel
-BuildRequires:	ffmpeg-devel
+BuildRequires:	ffmpeg-devel >= 0.8
 BuildRequires:	flac-devel
 BuildRequires:	gettext-devel
 %{?with_gnome:BuildRequires:	gnome-vfs2-devel}
@@ -781,6 +782,7 @@
 %{?with_vdr:%patch4 -p1}
 %patch5 -p1
 %patch6 -p0
+%patch7 -p1
 
 # kill hack, it fails with recent automake
 echo 'AC_DEFUN([AM_PROG_AS_MOD],[AM_PROG_AS])' > m4/as.m4
@@ -1160,6 +1162,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.283  2011/06/27 20:02:59  qboosh
+- added ffmpeg-0.8 patch
+
 Revision 1.282  2011/06/27 09:56:44  lisu
 - rel 10
 

================================================================
Index: packages/xine-lib/xine-lib-ffmpeg-0.8.patch
diff -u /dev/null packages/xine-lib/xine-lib-ffmpeg-0.8.patch:1.1
--- /dev/null	Mon Jun 27 22:03:08 2011
+++ packages/xine-lib/xine-lib-ffmpeg-0.8.patch	Mon Jun 27 22:02:59 2011
@@ -0,0 +1,101 @@
+--- xine-lib-1.1.19/src/combined/ffmpeg/ff_video_decoder.c.orig	2010-03-10 20:07:15.000000000 +0100
++++ xine-lib-1.1.19/src/combined/ffmpeg/ff_video_decoder.c	2011-06-27 21:46:28.835606968 +0200
+@@ -1055,12 +1055,16 @@ static void ff_handle_mpeg12_buffer (ff_
+     }
+ 
+     /* skip decoding b frames if too late */
+-    this->context->hurry_up = (this->skipframes > 0);
++    this->context->skip_frame = (this->skipframes > 0) ? AVDISCARD_NONREF : AVDISCARD_DEFAULT;
+ 
+     lprintf("avcodec_decode_video: size=%d\n", this->mpeg_parser->buffer_size);
+-    len = avcodec_decode_video (this->context, this->av_frame,
+-                                &got_picture, this->mpeg_parser->chunk_buffer,
+-                                this->mpeg_parser->buffer_size);
++    AVPacket avpkt;
++    av_init_packet(&avpkt);
++    avpkt.data = (uint8_t *)this->mpeg_parser->chunk_buffer;
++    avpkt.size = this->mpeg_parser->buffer_size;
++    avpkt.flags = AV_PKT_FLAG_KEY;
++    len = avcodec_decode_video2 (this->context, this->av_frame,
++                                &got_picture, &avpkt);
+     lprintf("avcodec_decode_video: decoded_size=%d, got_picture=%d\n",
+             len, got_picture);
+     len = current - buf->content - offset;
+@@ -1112,7 +1116,7 @@ static void ff_handle_mpeg12_buffer (ff_
+ 
+     } else {
+ 
+-      if (this->context->hurry_up) {
++      if (this->context->skip_frame != AVDISCARD_DEFAULT) {
+         /* skipped frame, output a bad frame */
+         img = this->stream->video_out->get_frame (this->stream->video_out,
+                                                   this->bih.biWidth,
+@@ -1304,12 +1308,16 @@ static void ff_handle_buffer (ff_video_d
+         got_picture = 0;
+       } else {
+         /* skip decoding b frames if too late */
+-        this->context->hurry_up = (this->skipframes > 0);
++        this->context->skip_frame = (this->skipframes > 0) ? AVDISCARD_NONREF : AVDISCARD_DEFAULT;
+ 
+         lprintf("buffer size: %d\n", this->size);
+-        len = avcodec_decode_video (this->context, this->av_frame,
+-                                    &got_picture, &chunk_buf[offset],
+-                                    this->size);
++	AVPacket avpkt;
++	av_init_packet(&avpkt);
++	avpkt.data = (uint8_t *)&chunk_buf[offset];
++	avpkt.size = this->size;
++	avpkt.flags = AV_PKT_FLAG_KEY;
++	len = avcodec_decode_video2 (this->context, this->av_frame,
++	                             &got_picture, &avpkt);
+ 
+ #ifdef AVCODEC_HAS_REORDERED_OPAQUE
+         /* reset consumed pts value */
+--- xine-lib-1.1.19/src/combined/ffmpeg/ff_audio_decoder.c.orig	2010-03-23 16:41:49.000000000 +0100
++++ xine-lib-1.1.19/src/combined/ffmpeg/ff_audio_decoder.c	2011-06-27 21:29:30.168906191 +0200
+@@ -255,6 +255,7 @@ static void ff_audio_decode_data (audio_
+       buf->decoder_info[2]);
+ 
+   } else if (!(buf->decoder_flags & BUF_FLAG_SPECIAL)) {
++    AVPacket avpkt;
+ 
+     if( !this->decoder_ok ) {
+       if ( ! this->context || ! this->codec ) {
+@@ -286,11 +287,13 @@ static void ff_audio_decode_data (audio_
+     if (!this->output_open) {
+       if (!this->audio_bits || !this->audio_sample_rate || !this->audio_channels) {
+         decode_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+-        avcodec_decode_audio2 (this->context,
+-                              (int16_t *)this->decode_buffer,
+-                              &decode_buffer_size,
+-                              &this->buf[0],
+-                              this->size);
++	av_init_packet(&avpkt);
++	avpkt.data = (uint8_t *)&this->buf[0];
++	avpkt.size = this->size;
++	avpkt.flags = AV_PKT_FLAG_KEY;
++	avcodec_decode_audio3 (this->context,
++			      (int16_t *)this->decode_buffer,
++			      &decode_buffer_size, &avpkt);
+ 	this->audio_bits = this->context->bits_per_sample;
+ 	this->audio_sample_rate = this->context->sample_rate;
+ 	this->audio_channels = this->context->channels;
+@@ -311,11 +314,13 @@ static void ff_audio_decode_data (audio_
+       offset = 0;
+       while (this->size>0) {
+         decode_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+-        bytes_consumed = avcodec_decode_audio2 (this->context,
+-                                               (int16_t *)this->decode_buffer,
+-                                               &decode_buffer_size,
+-                                               &this->buf[offset],
+-                                               this->size);
++	av_init_packet(&avpkt);
++	avpkt.data = (uint8_t *)&this->buf[offset];
++	avpkt.size = this->size;
++	avpkt.flags = AV_PKT_FLAG_KEY;
++	bytes_consumed = avcodec_decode_audio3 (this->context,
++			                       (int16_t *)this->decode_buffer,
++			                       &decode_buffer_size, &avpkt);
+ 
+         if (bytes_consumed<0) {
+           xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/xine-lib/xine-lib.spec?r1=1.282&r2=1.283&f=u



More information about the pld-cvs-commit mailing list