}
else if( p_stream->fmt.i_cat == VIDEO_ES )
{
+ int i_width = p_stream->fmt.video.i_width;
+ if( p_stream->fmt.video.i_aspect > 0 )
+ {
+ i_width = tkhd, p_stream->fmt.video.i_aspect *
+ p_stream->fmt.video.i_height /
+ VOUT_ASPECT_FACTOR << 16;
+ }
// width (presentation)
- bo_add_32be( tkhd, p_stream->fmt.video.i_aspect *
- p_stream->fmt.video.i_height /
- VOUT_ASPECT_FACTOR << 16 );
+ bo_add_32be( tkhd, i_width );
// height(presentation)
bo_add_32be( tkhd, p_stream->fmt.video.i_height << 16 );
}
mp4_stream_t *tk = p_sys->pp_streams[i];
if( tk->fmt.i_cat == VIDEO_ES )
{
- i_width = p_stream->fmt.video.i_aspect * p_stream->fmt.video.i_height / VOUT_ASPECT_FACTOR;
+ if( p_stream->fmt.video.i_aspect )
+ i_width = p_stream->fmt.video.i_aspect *
+ p_stream->fmt.video.i_height / VOUT_ASPECT_FACTOR;
+ else
+ i_width = p_stream->fmt.video.i_width;
i_height = p_stream->fmt.video.i_height;
break;
}