Author: kkofler
Update of /cvs/free/rpms/xine-lib-extras-freeworld/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv19325/devel
Modified Files:
xine-lib-extras-freeworld.spec
Added Files:
xine-lib-1.1.19-ffmpeg08.patch
Log Message:
* Thu Sep 29 2011 Kevin Kofler <Kevin(a)tigcc.ticalc.org> - 1.1.19-3
- fix build with FFmpeg 0.8 (#1957)
xine-lib-1.1.19-ffmpeg08.patch:
ff_audio_decoder.c | 19 +++++++++++++++++++
ff_video_decoder.c | 31 +++++++++++++++++++++++++++++++
2 files changed, 50 insertions(+)
--- NEW FILE xine-lib-1.1.19-ffmpeg08.patch ---
diff -up xine-lib-1.1.19/src/combined/ffmpeg/ff_audio_decoder.c.ffmpeg
xine-lib-1.1.19/src/combined/ffmpeg/ff_audio_decoder.c
--- xine-lib-1.1.19/src/combined/ffmpeg/ff_audio_decoder.c.ffmpeg 2010-03-23
16:41:49.000000000 +0100
+++ xine-lib-1.1.19/src/combined/ffmpeg/ff_audio_decoder.c 2011-08-27 19:21:47.000000000
+0200
@@ -286,11 +286,20 @@ 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;
+#if FF_API_AUDIO_OLD
avcodec_decode_audio2 (this->context,
(int16_t *)this->decode_buffer,
&decode_buffer_size,
&this->buf[0],
this->size);
+#else
+ AVPacket avpkt;
+ av_init_packet(&avpkt);
+ avpkt.data = &this->buf[0];
+ avpkt.size = this->size;
+ avcodec_decode_audio3 (this->context, (int16_t *)this->decode_buffer,
+ &decode_buffer_size, &avpkt);
+#endif
this->audio_bits = this->context->bits_per_sample;
this->audio_sample_rate = this->context->sample_rate;
this->audio_channels = this->context->channels;
@@ -311,12 +320,22 @@ static void ff_audio_decode_data (audio_
offset = 0;
while (this->size>0) {
decode_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+#if FF_API_AUDIO_OLD
bytes_consumed = avcodec_decode_audio2 (this->context,
(int16_t *)this->decode_buffer,
&decode_buffer_size,
&this->buf[offset],
this->size);
+#else
+ AVPacket avpkt;
+ av_init_packet(&avpkt);
+ avpkt.data = &this->buf[offset];
+ avpkt.size = this->size;
+ bytes_consumed = avcodec_decode_audio3 (this->context,
+ (int16_t *)this->decode_buffer,
+ &decode_buffer_size, &avpkt);
+#endif
if (bytes_consumed<0) {
xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
"ffmpeg_audio_dec: error decompressing audio frame\n");
diff -up xine-lib-1.1.19/src/combined/ffmpeg/ff_video_decoder.c.ffmpeg
xine-lib-1.1.19/src/combined/ffmpeg/ff_video_decoder.c
--- xine-lib-1.1.19/src/combined/ffmpeg/ff_video_decoder.c.ffmpeg 2010-03-10
20:07:15.000000000 +0100
+++ xine-lib-1.1.19/src/combined/ffmpeg/ff_video_decoder.c 2011-08-27 20:07:35.000000000
+0200
@@ -1055,12 +1055,25 @@ static void ff_handle_mpeg12_buffer (ff_
}
/* skip decoding b frames if too late */
+#if FF_API_HURRY_UP
this->context->hurry_up = (this->skipframes > 0);
+#else
+ this->context->skip_frame = (this->skipframes > 0);
+#endif
lprintf("avcodec_decode_video: size=%d\n",
this->mpeg_parser->buffer_size);
+#if FF_API_VIDEO_OLD
len = avcodec_decode_video (this->context, this->av_frame,
&got_picture, this->mpeg_parser->chunk_buffer,
this->mpeg_parser->buffer_size);
+#else
+ AVPacket avpkt;
+ av_init_packet(&avpkt);
+ avpkt.data = (uint8_t *) this->mpeg_parser->chunk_buffer;
+ avpkt.size = this->mpeg_parser->buffer_size;
+ len = avcodec_decode_video2 (this->context, this->av_frame,
+ &got_picture, &avpkt);
+#endif
lprintf("avcodec_decode_video: decoded_size=%d, got_picture=%d\n",
len, got_picture);
len = current - buf->content - offset;
@@ -1112,7 +1125,11 @@ static void ff_handle_mpeg12_buffer (ff_
} else {
+#if FF_API_HURRY_UP
if (this->context->hurry_up) {
+#else
+ if (this->context->skip_frame) {
+#endif
/* skipped frame, output a bad frame */
img = this->stream->video_out->get_frame
(this->stream->video_out,
this->bih.biWidth,
@@ -1304,12 +1321,26 @@ static void ff_handle_buffer (ff_video_d
got_picture = 0;
} else {
/* skip decoding b frames if too late */
+#if FF_API_HURRY_UP
this->context->hurry_up = (this->skipframes > 0);
+#else
+ this->context->skip_frame = (this->skipframes > 0);
+#endif
lprintf("buffer size: %d\n", this->size);
+#if FF_API_VIDEO_OLD
len = avcodec_decode_video (this->context, this->av_frame,
&got_picture, &chunk_buf[offset],
this->size);
+#else
+ AVPacket avpkt;
+ av_init_packet(&avpkt);
+ avpkt.data = (uint8_t *) &chunk_buf[offset];
+ avpkt.size = this->size;
+ len = avcodec_decode_video2 (this->context, this->av_frame,
+ &got_picture, &avpkt);
+#endif
+
#ifdef AVCODEC_HAS_REORDERED_OPAQUE
/* reset consumed pts value */
Index: xine-lib-extras-freeworld.spec
===================================================================
RCS file: /cvs/free/rpms/xine-lib-extras-freeworld/devel/xine-lib-extras-freeworld.spec,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- xine-lib-extras-freeworld.spec 26 Sep 2011 21:27:55 -0000 1.35
+++ xine-lib-extras-freeworld.spec 29 Sep 2011 22:22:25 -0000 1.36
@@ -9,7 +9,7 @@
Name: xine-lib-extras-freeworld
Summary: Extra codecs for the Xine multimedia library
Version: 1.1.19
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL:
http://xinehq.de/
@@ -17,7 +17,8 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: xine-lib-1.1.3-optflags.patch
-Patch6: xine-lib-1.1.1-deepbind-939.patch
+Patch1: xine-lib-1.1.1-deepbind-939.patch
+Patch2: xine-lib-1.1.19-ffmpeg08.patch
## upstreamable patches
@@ -69,7 +70,8 @@
%patch0 -p1 -b .optflags
touch -r m4/optimizations.m4.stamp m4/optimizations.m4
# when compiling with external ffmpeg and internal libfaad #939.
-#patch6 -p1 -b .deepbind
+#patch1 -p1 -b .deepbind
+%patch2 -p1 -b .ffmpeg08
# Avoid standard rpaths on lib64 archs:
sed -i -e 's|"/lib /usr/lib\b|"/%{_lib} %{_libdir}|' configure
@@ -186,6 +188,9 @@
%changelog
+* Thu Sep 29 2011 Kevin Kofler <Kevin(a)tigcc.ticalc.org> - 1.1.19-3
+- fix build with FFmpeg 0.8 (#1957)
+
* Mon Sep 26 2011 Nicolas Chauvet <kwizart(a)gmail.com> - 1.1.19-2
- Rebuilt for FFmpeg-0.8