summaryrefslogtreecommitdiff
path: root/src/libffmpeg
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2007-05-06 14:49:34 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2007-05-06 14:49:34 +0100
commit0dc0ca8b6210e4abc107357b327df16fe75f5536 (patch)
tree05f1164c58db7daceadbc7c226eed8df5b5ab6aa /src/libffmpeg
parent8aea2088058d9f51cd4a28a60485b287565f6567 (diff)
parent9a3aa1d854a3c8dcdf22cbe5db289425321b2499 (diff)
downloadxine-lib-0dc0ca8b6210e4abc107357b327df16fe75f5536.tar.gz
xine-lib-0dc0ca8b6210e4abc107357b327df16fe75f5536.tar.bz2
Merge Reinhard Nissl's ffmpeg fixes.
Diffstat (limited to 'src/libffmpeg')
-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 e04c680b7..3943fd05d 100644
--- a/src/libffmpeg/ff_video_decoder.c
+++ b/src/libffmpeg/ff_video_decoder.c
@@ -1186,6 +1186,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;