diff options
Diffstat (limited to 'src/libmpeg2/slice_xvmc.c')
-rw-r--r-- | src/libmpeg2/slice_xvmc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libmpeg2/slice_xvmc.c b/src/libmpeg2/slice_xvmc.c index 1f6176e78..c4d2a5ff0 100644 --- a/src/libmpeg2/slice_xvmc.c +++ b/src/libmpeg2/slice_xvmc.c @@ -35,6 +35,8 @@ #include "attributes.h" #include "accel_xvmc.h" +#include "xvmc.h" + #define MOTION_ACCEL XINE_VO_MOTION_ACCEL #define IDCT_ACCEL XINE_VO_IDCT_ACCEL @@ -1694,7 +1696,7 @@ static inline int slice_xvmc_init (picture_t * picture, int code) #undef bit_ptr } -void mpeg2_xvmc_slice (picture_t * picture, int code, uint8_t * buffer) +void mpeg2_xvmc_slice (mpeg2dec_t *mpeg2dec, picture_t * picture, int code, uint8_t * buffer) { #define bit_buf (picture->bitstream_buf) #define bits (picture->bitstream_bits) @@ -1702,6 +1704,12 @@ void mpeg2_xvmc_slice (picture_t * picture, int code, uint8_t * buffer) cpu_state_t cpu_state; xine_xvmc_t *xvmc = (xine_xvmc_t *) picture->current_frame->accel_data; + if (1 == code) { + mpeg2dec->xvmc_last_slice_code = 0; + } + if (code != mpeg2dec->xvmc_last_slice_code + 1) + return; + bitstream_init (picture, buffer); if (slice_xvmc_init (picture, code)) @@ -1928,6 +1936,7 @@ void mpeg2_xvmc_slice (picture_t * picture, int code, uint8_t * buffer) default: /* end of slice, or error */ if (mpeg2_cpu_state_restore) mpeg2_cpu_state_restore (&cpu_state); + mpeg2dec->xvmc_last_slice_code++; return; } } @@ -2027,6 +2036,7 @@ void mpeg2_xvmc_slice (picture_t * picture, int code, uint8_t * buffer) } } } + mpeg2dec->xvmc_last_slice_code++; #undef bit_buf #undef bits #undef bit_ptr |