summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/player.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/player.cc b/src/player.cc
index 2a08dc1..1f00c19 100644
--- a/src/player.cc
+++ b/src/player.cc
@@ -91,8 +91,8 @@ void Player::player()
SDL_Rect rect;
Frame *frame;
// AVPicture pict;
- unsigned char pixel_buffer[720 * 576 * 3];
- int pitches[3];
+ unsigned char pixel_buffer[720 * 576][3];
+ // int pitches[3];
int i;
struct timespec ts;
@@ -112,7 +112,6 @@ void Player::player()
pict.linesize[i] = overlay->pitches[i];
}
*/
-
dv_decoder_t *decoder = NULL;
decoder = dv_decoder_new(FALSE, FALSE, FALSE);
decoder->quality = DV_QUALITY_BEST;
@@ -145,16 +144,17 @@ void Player::player()
// img_convert(&pict, PIX_FMT_YUV420P, (AVPicture *)f->frame,
// PIX_FMT_YUV420P, DISPLAYWIDTH, DISPLAYHEIGHT);
-
+
+ SDL_LockYUVOverlay(overlay);
// libdv img decode
dv_decode_full_frame(decoder,
(const uint8_t*)frame->data,
e_dv_color_yuv,
- (uint8_t**)pixel_buffer,
- pitches);
+ overlay->pixels,
+ (int*)overlay->pitches);
- SDL_LockYUVOverlay(overlay);
- overlay->pixels = (Uint8**)pixel_buffer;
+ // SDL_LockYUVOverlay(overlay);
+ // overlay->pixels = (Uint8**)pixel_buffer;
SDL_UnlockYUVOverlay(overlay);
SDL_DisplayYUVOverlay(overlay, &rect);
// delete f;