# HG changeset patch
# User reimar
# Date 1333970757 0
# Node ID c1db6548917e4af20f895366be6b472b1e3fcf7c
# Parent  02a03e00341ebb91e686b7f5707bd00948cded01
RM demuxer: set aspect from container video dimensions.

Fixes the sample from FFmpeg trac issue #785.

diff -r 02a03e00341e -r c1db6548917e libmpdemux/demux_real.c
--- a/libmpdemux/demux_real.c	Sat Apr 07 20:08:53 2012 +0000
+++ b/libmpdemux/demux_real.c	Mon Apr 09 11:25:57 2012 +0000
@@ -1519,6 +1519,8 @@
 	    	    sh->bih->biSize = sizeof(*sh->bih);
 		    sh->disp_w = sh->bih->biWidth = stream_read_word(demuxer->stream);
 		    sh->disp_h = sh->bih->biHeight = stream_read_word(demuxer->stream);
+		    if (sh->disp_w > 0 && sh->disp_h > 0)
+			sh->aspect = (float)sh->disp_w / sh->disp_h;
 		    sh->bih->biPlanes = 1;
 		    sh->bih->biBitCount = 24;
 		    sh->bih->biCompression = sh->format;