break;
}
- p_dec->fmt_out.video.i_visible_width =
+ p_dec->fmt_out.video.i_visible_width = p_sys->p_format->clean_width;
+ p_dec->fmt_out.video.i_x_offset = p_sys->p_format->left_offset;
p_dec->fmt_out.video.i_width = p_sys->p_format->width;
- p_dec->fmt_out.video.i_visible_height =
+ p_dec->fmt_out.video.i_visible_height = p_sys->p_format->clean_height;
+ p_dec->fmt_out.video.i_y_offset = p_sys->p_format->top_offset;
p_dec->fmt_out.video.i_height = p_sys->p_format->height;
/* aspect_ratio_[numerator|denominator] describes the pixel aspect ratio */
static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
{
decoder_sys_t *p_sys = p_dec->p_sys;
- uint32_t u_pnum;
if( !pp_block ) return NULL;
case SCHRO_DECODER_OK: {
SchroTag *p_tag = schro_decoder_get_picture_tag( p_sys->p_schro );
- u_pnum = schro_decoder_get_picture_number( p_sys->p_schro );
p_schroframe = schro_decoder_pull( p_sys->p_schro );
if( !p_schroframe->priv )
{
p_pic = ((struct picture_free_t*) p_schroframe->priv)->p_pic;
p_schroframe->priv = NULL;
- /* solve presentation time stamp for picture. If this picture
- * was not tagged with a pts when presented to decoder, interpolate
- * one
- * This means no need to set p_pic->b_force, as we have a pts on
- * each picture */
if( p_tag )
{
/* free is handled by schro_frame_unref */
p_pic->date = *(mtime_t*) p_tag->value;
schro_tag_free( p_tag );
- msg_Err(p_dec, "pts out: %"PRId64, p_pic->date);
}
else if( p_sys->i_lastpts >= 0 )
{
+ /* NB, this shouldn't happen since the packetizer does a
+ * very thorough job of inventing timestamps. The
+ * following is just a very rough fall back incase packetizer
+ * is missing. */
+ /* maybe it would be better to set p_pic->b_force ? */
p_pic->date = p_sys->i_lastpts + p_sys->i_frame_pts_delta;
- /* fixme */
- msg_Err(p_dec, "no pts");
}
p_sys->i_lastpts = p_pic->date;