summaryrefslogtreecommitdiff
path: root/lib/libdv_wrapper.cc
diff options
context:
space:
mode:
authordeva <deva>2006-04-10 14:14:31 +0000
committerdeva <deva>2006-04-10 14:14:31 +0000
commitff2a0b78a229d2fac6162d2fa88f3e058b6382d8 (patch)
treee5195cf2aea739981e1c6c3a8a56b216b5db9fd7 /lib/libdv_wrapper.cc
parentd90e7cb1937c4903fcfe5593a6a59be52763f235 (diff)
*** empty log message ***
Diffstat (limited to 'lib/libdv_wrapper.cc')
-rw-r--r--lib/libdv_wrapper.cc12
1 files changed, 7 insertions, 5 deletions
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;