diff options
-rw-r--r-- | src/encoder.cc | 4 | ||||
-rw-r--r-- | src/player.cc | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/encoder.cc b/src/encoder.cc index a762c99..714ee81 100644 --- a/src/encoder.cc +++ b/src/encoder.cc @@ -94,8 +94,8 @@ void Encoder::encode() n->sendPackage(&h, f->data, f->size); - free(f->data); - delete f; + // free(f->data); + // delete f; } } pthread_exit(NULL); 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; |