Mercurial > mplayer.hg
comparison libmpeg2/libmpeg2_changes.diff @ 31860:32a214ee10e5
Restore hunk previously removed in r31354.
This fixes a crash with http://samples.mplayerhq.hu/MPEG2/libmpeg2-crash.vob
| author | diego |
|---|---|
| date | Fri, 06 Aug 2010 23:44:31 +0000 |
| parents | 60709ef498be |
| children |
comparison
equal
deleted
inserted
replaced
| 31859:44f8d08901fe | 31860:32a214ee10e5 |
|---|---|
| 126 if (accel & MPEG2_ACCEL_PPC_ALTIVEC) { | 126 if (accel & MPEG2_ACCEL_PPC_ALTIVEC) { |
| 127 mpeg2_cpu_state_save = state_save_altivec; | 127 mpeg2_cpu_state_save = state_save_altivec; |
| 128 mpeg2_cpu_state_restore = state_restore_altivec; | 128 mpeg2_cpu_state_restore = state_restore_altivec; |
| 129 --- libmpeg2/header.c 2006-06-16 20:12:26.000000000 +0200 | 129 --- libmpeg2/header.c 2006-06-16 20:12:26.000000000 +0200 |
| 130 +++ libmpeg2/header.c 2006-06-16 20:12:50.000000000 +0200 | 130 +++ libmpeg2/header.c 2006-06-16 20:12:50.000000000 +0200 |
| 131 @@ -872,6 +879,7 @@ | 131 @@ -872,6 +876,7 @@ |
| 132 mpeg2dec->scaled[idx] = decoder->q_scale_type; | 132 mpeg2dec->scaled[idx] = decoder->q_scale_type; |
| 133 for (i = 0; i < 32; i++) { | 133 for (i = 0; i < 32; i++) { |
| 134 k = decoder->q_scale_type ? non_linear_scale[i] : (i << 1); | 134 k = decoder->q_scale_type ? non_linear_scale[i] : (i << 1); |
| 135 + decoder->quantizer_scales[i] = k; | 135 + decoder->quantizer_scales[i] = k; |
| 136 for (j = 0; j < 64; j++) | 136 for (j = 0; j < 64; j++) |
| 353 + char* quant_store; | 353 + char* quant_store; |
| 354 + int quant_stride; | 354 + int quant_stride; |
| 355 }; | 355 }; |
| 356 | 356 |
| 357 typedef struct { | 357 typedef struct { |
| 358 @@ -226,7 +238,7 @@ | 358 @@ -226,7 +235,7 @@ |
| 359 }; | 359 }; |
| 360 | 360 |
| 361 typedef struct { | 361 typedef struct { |
| 362 -#ifdef ARCH_PPC | 362 -#ifdef ARCH_PPC |
| 363 +#if ARCH_PPC | 363 +#if ARCH_PPC |
| 397 + = decoder->quantizer_scale; \ | 397 + = decoder->quantizer_scale; \ |
| 398 + } \ | 398 + } \ |
| 399 decoder->offset += 16; \ | 399 decoder->offset += 16; \ |
| 400 if (decoder->offset == decoder->width) { \ | 400 if (decoder->offset == decoder->width) { \ |
| 401 do { /* just so we can use the break statement */ \ | 401 do { /* just so we can use the break statement */ \ |
| 402 --- libmpeg2/decode.c (revision 31938) | |
| 403 +++ libmpeg2/decode.c (working copy) | |
| 404 @@ -345,6 +345,13 @@ | |
| 405 fbuf->buf[1] = buf[1]; | |
| 406 fbuf->buf[2] = buf[2]; | |
| 407 fbuf->id = id; | |
| 408 + // HACK! FIXME! At first I frame, copy pointers to prediction frame too! | |
| 409 + if (mpeg2dec->custom_fbuf && !mpeg2dec->fbuf[1]->buf[0]) { | |
| 410 + mpeg2dec->fbuf[1]->buf[0] = buf[0]; | |
| 411 + mpeg2dec->fbuf[1]->buf[1] = buf[1]; | |
| 412 + mpeg2dec->fbuf[1]->buf[2] = buf[2]; | |
| 413 + mpeg2dec->fbuf[1]->id = NULL; | |
| 414 + } | |
| 415 } | |
| 416 | |
| 417 void mpeg2_custom_fbuf (mpeg2dec_t * mpeg2dec, int custom_fbuf) |
