From ff2a0b78a229d2fac6162d2fa88f3e058b6382d8 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 10 Apr 2006 14:14:31 +0000 Subject: *** empty log message *** --- lib/libdv_wrapper.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/libdv_wrapper.cc') diff --git a/lib/libdv_wrapper.cc b/lib/libdv_wrapper.cc index d570e2c..563c709 100644 --- a/lib/libdv_wrapper.cc +++ b/lib/libdv_wrapper.cc @@ -26,7 +26,7 @@ */ #include "libdv_wrapper.h" -static bool first = true; +//#define COLORSPACE_YV12 LibDVWrapper::LibDVWrapper(DV::Quality quality, DV::System system, @@ -39,8 +39,11 @@ LibDVWrapper::LibDVWrapper(DV::Quality quality, setSystem(system); setSampling(sampling); + yuv[0] = yuv[1] = yuv[2] = NULL; + width = 720; height = 576; + first = true; } @@ -74,19 +77,18 @@ void LibDVWrapper::setOutputBuffer(char *output) pitches[1] = width / 2; pitches[2] = width / 2; #else - yuv[0] = (unsigned char*)output;//render.getDisplayData(); // Decode directly to the XVideo buffer + yuv[0] = (unsigned char*)output; pitches[0] = width * 2; #endif } void LibDVWrapper::decode(char *input) { + if(!yuv[0]) return; // outputbuffer not set! + if(first) { dv_parse_header(decoder, (const uint8_t*)input); //dv_parse_packs(decoder, frame->data); // Not needed anyway! - - // decoder->system = e_dv_system_625_50; // PAL lines, PAL framerate - // decoder->sampling = e_dv_sample_422; // 4 bytes y, 2 bytes u, 2 bytes v decoder->std = e_dv_std_iec_61834; decoder->num_dif_seqs = 12; first = false; -- cgit v1.2.3