diff options
author | Reinhard Nißl <rnissl@gmx.de> | 2007-04-15 19:06:31 +0200 |
---|---|---|
committer | Reinhard Nißl <rnissl@gmx.de> | 2007-04-15 19:06:31 +0200 |
commit | 9a3aa1d854a3c8dcdf22cbe5db289425321b2499 (patch) | |
tree | cf3f1cca7a571956e0f33fb7f425c134123be907 /src/libffmpeg/ff_video_decoder.c | |
parent | c552e457732c3c7b84b66ed8548713be52561487 (diff) | |
download | xine-lib-9a3aa1d854a3c8dcdf22cbe5db289425321b2499.tar.gz xine-lib-9a3aa1d854a3c8dcdf22cbe5db289425321b2499.tar.bz2 |
Initialize image size in bmiheader with data from AVCodecContext, if still uninitalized.
Diffstat (limited to 'src/libffmpeg/ff_video_decoder.c')
-rw-r--r-- | src/libffmpeg/ff_video_decoder.c | 5 |
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; |