diff options
author | Thomas Hellström <totte67@users.sourceforge.net> | 2004-11-13 19:32:51 +0000 |
---|---|---|
committer | Thomas Hellström <totte67@users.sourceforge.net> | 2004-11-13 19:32:51 +0000 |
commit | a213a237d17cd0fb00611fe56380a94e3b675638 (patch) | |
tree | fe2becd5ec1174361acf90e0977c8bd4f5c1690c /src/libmpeg2/slice_xvmc.c | |
parent | c6a1bafda333d15e7b5559cc085200a3c930a13c (diff) | |
download | xine-lib-a213a237d17cd0fb00611fe56380a94e3b675638.tar.gz xine-lib-a213a237d17cd0fb00611fe56380a94e3b675638.tar.bz2 |
Fixed segfault when seeking with the "xvmc" and "xxmc" plugins playing
files with IDCT / mocomp XvMC acceleration.
Cleaned up some ugly xvmc / xxmc naming.
CVS patchset: 7122
CVS date: 2004/11/13 19:32:51
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 |