diff options
Diffstat (limited to 'src/player.cc')
-rw-r--r-- | src/player.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/player.cc b/src/player.cc index 12c8c17..88566e1 100644 --- a/src/player.cc +++ b/src/player.cc @@ -113,10 +113,8 @@ void Player::player() } */ dv_decoder_t *decoder = NULL; - decoder = dv_decoder_new(FALSE, FALSE, FALSE); + decoder = dv_decoder_new(FALSE, TRUE, TRUE); decoder->quality = DV_QUALITY_BEST; - decoder->clamp_luma = FALSE; - decoder->clamp_chroma = FALSE; while(*running) { // Wait for the semaphore to be free... then run @@ -145,17 +143,19 @@ void Player::player() // img_convert(&pict, PIX_FMT_YUV420P, (AVPicture *)f->frame, // PIX_FMT_YUV420P, DISPLAYWIDTH, DISPLAYHEIGHT); - SDL_LockYUVOverlay(overlay); + // libdv img decode + SDL_LockYUVOverlay(overlay); + dv_decode_full_frame(decoder, (const uint8_t*)frame->data, e_dv_color_yuv, overlay->pixels, pitches); - overlay->pitches[0] = picthes[0]; - overlay->pitches[1] = picthes[1]; - overlay->pitches[2] = picthes[2]; + overlay->pitches[0] = pitches[0]; + overlay->pitches[1] = pitches[1]; + overlay->pitches[2] = pitches[2]; // SDL_LockYUVOverlay(overlay); // overlay->pixels = (Uint8**)pixel_buffer; |