diff options
author | Torsten Jager <t.jager@gmx.de> | 2012-05-10 15:43:52 +0300 |
---|---|---|
committer | Torsten Jager <t.jager@gmx.de> | 2012-05-10 15:43:52 +0300 |
commit | 1ac90ffd4e9f4c26ac8b4027dcfd91a8bf92c2ec (patch) | |
tree | d32d693058ec6f59d00505d6cdd6c03841d4d51b /src | |
parent | 02e2ec6c5cd0ef3a7dd9b4908f179e9c53c1b354 (diff) | |
download | xine-lib-1ac90ffd4e9f4c26ac8b4027dcfd91a8bf92c2ec.tar.gz xine-lib-1ac90ffd4e9f4c26ac8b4027dcfd91a8bf92c2ec.tar.bz2 |
ff_video_decoder: fixed cropping
Diffstat (limited to 'src')
-rw-r--r-- | src/combined/ffmpeg/ff_video_decoder.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index 60bb55f44..11f07565c 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -1619,8 +1619,8 @@ static void ff_handle_buffer (ff_video_decoder_t *this, buf_element_t *buf) { img->duration = video_step_to_use; /* additionally crop away the extra pixels due to adjusting frame size above */ - img->crop_right = this->crop_right + (img->width - this->bih.biWidth); - img->crop_bottom = this->crop_bottom + (img->height - this->bih.biHeight); + img->crop_right = img->width - this->bih.biWidth; + img->crop_bottom = img->height - this->bih.biHeight; /* transfer some more frame settings for deinterlacing */ img->progressive_frame = !this->av_frame->interlaced_frame; @@ -1656,8 +1656,8 @@ static void ff_handle_buffer (ff_video_decoder_t *this, buf_element_t *buf) { img->duration = video_step_to_use; /* additionally crop away the extra pixels due to adjusting frame size above */ - img->crop_right = ((this->bih.biWidth <= 0) ? 0 : this->crop_right) + (img->width - this->bih.biWidth); - img->crop_bottom = ((this->bih.biHeight <= 0) ? 0 : this->crop_bottom) + (img->height - this->bih.biHeight); + img->crop_right = this->bih.biWidth <= 0 ? 0 : (img->width - this->bih.biWidth); + img->crop_bottom = this->bih.biHeight <= 0 ? 0 : (img->height - this->bih.biHeight); img->bad_frame = 1; this->skipframes = img->draw(img, this->stream); |