diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2012-02-08 23:41:35 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2012-02-08 23:41:35 +0000 |
commit | 013fde587fae684931759737d450d6e0f45432ef (patch) | |
tree | 4bdac13f22191f6dfd09f6fa91c705364d43dec5 /src | |
parent | 65723aa841ea45d2974e405899687f5f6901aa31 (diff) | |
parent | a5be135136fe669714ad4ac9c22519f06a8b2a25 (diff) | |
download | xine-lib-013fde587fae684931759737d450d6e0f45432ef.tar.gz xine-lib-013fde587fae684931759737d450d6e0f45432ef.tar.bz2 |
Merge from 1.2.1-branch.
Diffstat (limited to 'src')
-rw-r--r-- | src/audio_dec/xine_musepack_decoder.c | 2 | ||||
-rw-r--r-- | src/combined/ffmpeg/ff_video_decoder.c | 14 | ||||
-rw-r--r-- | src/combined/ffmpeg/ffmpeg_compat.h | 4 | ||||
-rw-r--r-- | src/input/input_dvb.c | 8 | ||||
-rw-r--r-- | src/video_out/video_out_opengl.c | 14 |
5 files changed, 35 insertions, 7 deletions
diff --git a/src/audio_dec/xine_musepack_decoder.c b/src/audio_dec/xine_musepack_decoder.c index 84aee9387..758ca9726 100644 --- a/src/audio_dec/xine_musepack_decoder.c +++ b/src/audio_dec/xine_musepack_decoder.c @@ -53,7 +53,7 @@ #elif defined(HAVE_MPC_MPCDEC_H) # include <mpc/mpcdec.h> #else -# include "musepack/musepack.h" +# include "mpcdec/mpcdec.h" #endif #define MPC_DECODER_MEMSIZE 65536 diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index 92bdee95a..5334b8d71 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -127,7 +127,9 @@ struct ff_video_decoder_s { yuv_planes_t yuv; +#ifdef AVPaletteControl AVPaletteControl palette_control; +#endif #ifdef LOG enum PixelFormat debug_fmt; @@ -215,7 +217,9 @@ static int get_buffer(AVCodecContext *context, AVFrame *av_frame){ /* We should really keep track of the ages of xine frames (see * avcodec_default_get_buffer in libavcodec/utils.c) * For the moment tell ffmpeg that every frame is new (age = bignumber) */ +#ifdef AVFRAMEAGE av_frame->age = 256*256*256*64; +#endif av_frame->type= FF_BUFFER_TYPE_USER; @@ -1023,7 +1027,9 @@ static void ff_handle_special_buffer (ff_video_decoder_t *this, buf_element_t *b memcpy(this->context->extradata, buf->decoder_info_ptr[2], buf->decoder_info[2]); - } else if (buf->decoder_info[1] == BUF_SPECIAL_PALETTE) { + } +#ifdef AVPaletteControl + else if (buf->decoder_info[1] == BUF_SPECIAL_PALETTE) { unsigned int i; palette_entry_t *demuxer_palette; @@ -1042,7 +1048,9 @@ static void ff_handle_special_buffer (ff_video_decoder_t *this, buf_element_t *b } decoder_palette->palette_changed = 1; - } else if (buf->decoder_info[1] == BUF_SPECIAL_RV_CHUNK_TABLE) { + } +#endif + else if (buf->decoder_info[1] == BUF_SPECIAL_RV_CHUNK_TABLE) { int i; lprintf("BUF_SPECIAL_RV_CHUNK_TABLE\n"); @@ -1758,7 +1766,9 @@ static video_decoder_t *ff_video_open_plugin (video_decoder_class_t *class_gen, this->av_frame = avcodec_alloc_frame(); this->context = avcodec_alloc_context(); this->context->opaque = this; +#ifdef AVPaletteControl this->context->palctrl = NULL; +#endif this->decoder_ok = 0; this->decoder_init_mode = 1; diff --git a/src/combined/ffmpeg/ffmpeg_compat.h b/src/combined/ffmpeg/ffmpeg_compat.h index 371b5ccdb..69b9aa30e 100644 --- a/src/combined/ffmpeg/ffmpeg_compat.h +++ b/src/combined/ffmpeg/ffmpeg_compat.h @@ -91,5 +91,9 @@ # define AVAUDIO 2 #endif +/* AVFrame.age */ +#if !(LIBAVCODEC_VERSION_MAJOR >= 53 && LIBAVCODEC_VERSION_MAJOR >= 28 && LIBAVCODEC_VERSION_MICRO >= 1) +# define AVFRAMEAGE 1 +#endif #endif /* XINE_AVCODEC_COMPAT_H */ diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 14fac6eec..74365cc44 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -2470,10 +2470,10 @@ static void ts_rewrite_packets (dvb_input_plugin_t *this, unsigned char * origin crc = av_crc(this->class->av_crc, 0xffffffff, originalPkt+1, 12); - originalPkt[13]=(crc>>24) & 0xff; - originalPkt[14]=(crc>>16) & 0xff; - originalPkt[15]=(crc>>8) & 0xff; - originalPkt[16]=crc & 0xff; + originalPkt[13]=(crc ) & 0xff; + originalPkt[14]=(crc>> 8) & 0xff; + originalPkt[15]=(crc>>16) & 0xff; + originalPkt[16]=(crc>>24) & 0xff; memset(originalPkt+17,0xFF,PKT_SIZE-21); /* stuff the remainder */ } diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index d00a916e1..570afa2fd 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -1482,6 +1482,20 @@ static void opengl_overlay_blend (vo_driver_t *this_gen, XUnlockDisplay (this->display); } } else { + + if (!frame->rgb_dst) { + if (frame->format == XINE_IMGFMT_YV12) { + _x_blend_yuv(frame->vo_frame.base, overlay, + frame->width, frame->height, frame->vo_frame.pitches, + &this->alphablend_extra_data); + } else { + _x_blend_yuy2(frame->vo_frame.base[0], overlay, + frame->width, frame->height, frame->vo_frame.pitches[0], + &this->alphablend_extra_data); + } + return; + } + if (!overlay->rgb_clut || !overlay->hili_rgb_clut) opengl_overlay_clut_yuv2rgb (this, overlay, frame); |