diff options
Diffstat (limited to 'src/libmpeg2')
-rw-r--r-- | src/libmpeg2/Makefile.am | 3 | ||||
-rw-r--r-- | src/libmpeg2/decode.c | 7 | ||||
-rw-r--r-- | src/libmpeg2/motion_comp.c | 2 | ||||
-rw-r--r-- | src/libmpeg2/mpeg2.h | 6 | ||||
-rw-r--r-- | src/libmpeg2/slice_xvmc_vld.c | 4 | ||||
-rw-r--r-- | src/libmpeg2/xine_mpeg2_decoder.c | 8 |
6 files changed, 21 insertions, 9 deletions
diff --git a/src/libmpeg2/Makefile.am b/src/libmpeg2/Makefile.am index 9895aa5d7..849e56363 100644 --- a/src/libmpeg2/Makefile.am +++ b/src/libmpeg2/Makefile.am @@ -1,3 +1,4 @@ +include $(top_builddir)/misc/Makefile.plugins include $(top_srcdir)/misc/Makefile.common xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la @@ -22,7 +23,7 @@ xineplug_decode_mpeg2_la_SOURCES = \ xine_mpeg2_decoder.c \ libmpeg2_accel.c -xineplug_decode_mpeg2_la_LIBADD = $(XINE_LIB) $(MLIB_LIBS) -lm +xineplug_decode_mpeg2_la_LIBADD = $(XINE_LIB) $(MLIB_LIBS) $(LTLIBINTL) -lm xineplug_decode_mpeg2_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBMPEG2_CFLAGS) xineplug_decode_mpeg2_la_LDFLAGS = $(xineplug_ldflags) diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c index 58f34ccbc..c66b18691 100644 --- a/src/libmpeg2/decode.c +++ b/src/libmpeg2/decode.c @@ -461,9 +461,10 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, break; case 0xb7: /* sequence end code */ -#ifdef LOG_PAN_SCAN - printf ("libmpeg2: sequence end code not handled\n"); -#endif + mpeg2_flush(mpeg2dec); + mpeg2dec->is_sequence_needed = 1; + break; + case 0xb8: /* group of pictures start code */ if (mpeg2_header_group_of_pictures (picture, buffer)) { printf ("libmpeg2: bad group of pictures\n"); diff --git a/src/libmpeg2/motion_comp.c b/src/libmpeg2/motion_comp.c index 8779c1296..f8faa3ee5 100644 --- a/src/libmpeg2/motion_comp.c +++ b/src/libmpeg2/motion_comp.c @@ -68,7 +68,7 @@ void mpeg2_mc_init (uint32_t mm_accel) mpeg2_mc = mpeg2_mc_altivec; } else #endif -#ifdef ARCH_SPARC +#if defined(ARCH_SPARC) && defined(ENABLE_VIS) if (mm_accel & MM_ACCEL_SPARC_VIS) { #ifdef LOG fprintf (stderr, "Using VIS for motion compensation\n"); diff --git a/src/libmpeg2/mpeg2.h b/src/libmpeg2/mpeg2.h index 253f300a2..ae69688f5 100644 --- a/src/libmpeg2/mpeg2.h +++ b/src/libmpeg2/mpeg2.h @@ -31,7 +31,8 @@ typedef struct mpeg2dec_s { uint32_t frame_format; /* this is where we keep the state of the decoder */ - struct picture_s * picture, *picture_base; + struct picture_s * picture; + void *picture_base; uint32_t shift; int new_sequence; @@ -45,7 +46,8 @@ typedef struct mpeg2dec_s { /* which is 224K for MP@ML streams. */ /* (we make no pretenses of decoding anything more than that) */ /* allocated in init - gcc has problems allocating such big structures */ - uint8_t * chunk_buffer, *chunk_base; + uint8_t * chunk_buffer; + void *chunk_base; /* pointer to current position in chunk_buffer */ uint8_t * chunk_ptr; /* last start code ? */ diff --git a/src/libmpeg2/slice_xvmc_vld.c b/src/libmpeg2/slice_xvmc_vld.c index 7e370a519..cd4eca0a2 100644 --- a/src/libmpeg2/slice_xvmc_vld.c +++ b/src/libmpeg2/slice_xvmc_vld.c @@ -17,6 +17,10 @@ * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "xine_internal.h" #include "video_out.h" #include "mpeg2.h" diff --git a/src/libmpeg2/xine_mpeg2_decoder.c b/src/libmpeg2/xine_mpeg2_decoder.c index 4c4cc8654..b136ee861 100644 --- a/src/libmpeg2/xine_mpeg2_decoder.c +++ b/src/libmpeg2/xine_mpeg2_decoder.c @@ -20,6 +20,10 @@ * stuff needed to turn libmpeg2 into a xine decoder plugin */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <string.h> @@ -117,7 +121,7 @@ static void mpeg2dec_dispose (video_decoder_t *this_gen) { static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stream_t *stream) { mpeg2dec_decoder_t *this ; - this = (mpeg2dec_decoder_t *) xine_xmalloc (sizeof (mpeg2dec_decoder_t)); + this = (mpeg2dec_decoder_t *) calloc(1, sizeof(mpeg2dec_decoder_t)); this->video_decoder.decode_data = mpeg2dec_decode_data; this->video_decoder.flush = mpeg2dec_flush; @@ -155,7 +159,7 @@ static void *init_plugin (xine_t *xine, void *data) { mpeg2_class_t *this; - this = (mpeg2_class_t *) xine_xmalloc (sizeof (mpeg2_class_t)); + this = (mpeg2_class_t *) calloc(1, sizeof(mpeg2_class_t)); this->decoder_class.open_plugin = open_plugin; this->decoder_class.get_identifier = get_identifier; |