static int OpenVideo( decoder_t * );
static aout_buffer_t *DecodeAudio( decoder_t *, block_t ** );
+#ifndef WIN32
static picture_t *DecodeVideo( decoder_t *, block_t ** );
+#endif
#define FCC( a, b , c, d ) \
((uint32_t)( ((a)<<24)|((b)<<16)|((c)<<8)|(d)))
};
static int QTAudioInit( decoder_t * );
+#ifndef WIN32
static int QTVideoInit( decoder_t * );
+#endif
/*****************************************************************************
* Open: probe the decoder and return score
#ifdef __APPLE__
OSErr err;
SInt32 qtVersion, macosversion;
-
+
err = Gestalt(gestaltQuickTimeVersion, &qtVersion);
err = Gestalt(gestaltSystemVersion, &macosversion);
#ifndef NDEBUG
if( p_sys->i_buffer_size < p_sys->i_buffer + p_block->i_buffer )
{
p_sys->i_buffer_size = p_sys->i_buffer + p_block->i_buffer + 1024;
- p_sys->p_buffer = realloc( p_sys->p_buffer, p_sys->i_buffer_size );
+ p_sys->p_buffer = xrealloc( p_sys->p_buffer, p_sys->i_buffer_size );
}
memcpy( &p_sys->p_buffer[p_sys->i_buffer], p_block->p_buffer,
p_block->i_buffer );
p_sys->i_buffer );
}
- if( p_sys->pts != 0 &&
+ if( p_sys->pts > VLC_TS_INVALID &&
p_sys->pts != date_Get( &p_sys->date ) )
{
date_Set( &p_sys->date, p_sys->pts );
if( p_out )
{
- p_out->start_date = date_Get( &p_sys->date );
- p_out->end_date = date_Increment( &p_sys->date, i_frames );
+ p_out->i_pts = date_Get( &p_sys->date );
+ p_out->i_length = date_Increment( &p_sys->date, i_frames )
+ - p_out->i_pts;
memcpy( p_out->p_buffer,
&p_sys->out_buffer[2 * p_sys->i_out * p_dec->fmt_out.audio.i_channels],
- p_out->i_nb_bytes );
+ p_out->i_buffer );
p_sys->i_out += i_frames;
}
es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_CODEC_YUYV);
p_dec->fmt_out.video.i_width = p_dec->fmt_in.video.i_width;
p_dec->fmt_out.video.i_height= p_dec->fmt_in.video.i_height;
- p_dec->fmt_out.video.i_aspect = VOUT_ASPECT_FACTOR * p_dec->fmt_in.video.i_width / p_dec->fmt_in.video.i_height;
-
+ p_dec->fmt_out.video.i_sar_num = 1;
+ p_dec->fmt_out.video.i_sar_den = 1;
+
vlc_mutex_unlock( &qt_mutex );
return VLC_SUCCESS;
p_block = *pp_block;
*pp_block = NULL;
- i_pts = p_block->i_pts ? p_block->i_pts : p_block->i_dts;
+ i_pts = p_block->i_pts > VLC_TS_INVALID ? p_block->i_pts : p_block->i_dts;
mtime_t i_display_date = 0;
if( !(p_block->i_flags & BLOCK_FLAG_PREROLL) )