summaryrefslogtreecommitdiff
path: root/src/libffmpeg/ff_video_decoder.c
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2007-05-08 17:11:27 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2007-05-08 17:11:27 +0100
commit92d72104e3cd37e7470a41a65b230297592f1331 (patch)
tree5b411206574417f441e169d86f93db2a136dd027 /src/libffmpeg/ff_video_decoder.c
parentefbef33b133ee728285f6bfb5f5014041dc991d4 (diff)
parent213eac661441a9c482f280c5cb5ec63240c8d29e (diff)
downloadxine-lib-92d72104e3cd37e7470a41a65b230297592f1331.tar.gz
xine-lib-92d72104e3cd37e7470a41a65b230297592f1331.tar.bz2
Merge from 1.1.
Diffstat (limited to 'src/libffmpeg/ff_video_decoder.c')
-rw-r--r--src/libffmpeg/ff_video_decoder.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libffmpeg/ff_video_decoder.c b/src/libffmpeg/ff_video_decoder.c
index c6506c0e5..d7d162387 100644
--- a/src/libffmpeg/ff_video_decoder.c
+++ b/src/libffmpeg/ff_video_decoder.c
@@ -1184,6 +1184,11 @@ static void ff_handle_buffer (ff_video_decoder_t *this, buf_element_t *buf) {
if ((this->aspect_ratio_prio < 2) &&
av_cmp_q(this->context->sample_aspect_ratio, avr00)) {
+ if (!this->bih.biWidth || !this->bih.biHeight) {
+ this->bih.biWidth = this->context->width;
+ this->bih.biHeight = this->context->height;
+ }
+
this->aspect_ratio = av_q2d(this->context->sample_aspect_ratio) *
(double)this->bih.biWidth / (double)this->bih.biHeight;
this->aspect_ratio_prio = 2;