diff options
| author | Petri Hintukainen <phintuka@users.sourceforge.net> | 2012-06-15 12:11:37 +0300 |
|---|---|---|
| committer | Petri Hintukainen <phintuka@users.sourceforge.net> | 2012-06-15 12:11:37 +0300 |
| commit | 792ebfba1c222969181538340ec10d46a2278185 (patch) | |
| tree | 1496dc2e933cb20dcddd29cee49370e2513f5e6f /src/video_out | |
| parent | 7b1e1cf0b7ddfba9d79f47fe365619617b39fe08 (diff) | |
| parent | a214d323e70910f1572431c4f5d66001f57ef557 (diff) | |
| download | xine-lib-792ebfba1c222969181538340ec10d46a2278185.tar.gz xine-lib-792ebfba1c222969181538340ec10d46a2278185.tar.bz2 | |
Merge from 1.1
--HG--
rename : src/libxinevdec/gdkpixbuf.c => src/video_dec/gdkpixbuf.c
rename : src/libxinevdec/image.c => src/video_dec/image.c
Diffstat (limited to 'src/video_out')
| -rw-r--r-- | src/video_out/video_out_xcbxv.c | 17 | ||||
| -rw-r--r-- | src/video_out/video_out_xv.c | 17 |
2 files changed, 26 insertions, 8 deletions
diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index b6e272d37..f24141db7 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -99,6 +99,7 @@ typedef struct { unsigned int xv_pitches[3]; unsigned int xv_offsets[3]; + int req_width, req_height; } xv_frame_t; @@ -360,8 +361,8 @@ static void xv_update_frame_format (vo_driver_t *this_gen, width = (width + 7) & ~0x7; } - if ((frame->width != width) - || (frame->height != height) + if ((frame->req_width != width) + || (frame->req_height != height) || (frame->format != format)) { /* printf (LOG_MODULE ": updating frame to %d x %d (ratio=%d, format=%08x)\n",width,height,ratio_code,format); */ @@ -390,13 +391,21 @@ static void xv_update_frame_format (vo_driver_t *this_gen, frame->vo_frame.base[2] = frame->image + frame->xv_offsets[1]; } - frame->width = width; - frame->height = height; + /* allocated frame size may not match requested size */ + frame->req_width = width; + frame->req_height = height; + frame->width = frame->xv_width; + frame->height = frame->xv_height; frame->format = format; pthread_mutex_unlock(&this->main_mutex); } + if (frame->vo_frame.width > frame->width) + frame->vo_frame.width = frame->width; + if (frame->vo_frame.height > frame->height) + frame->vo_frame.height = frame->height; + frame->ratio = ratio; } diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 4e37e154b..a17017b7f 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -102,6 +102,7 @@ typedef struct { XvImage *image; XShmSegmentInfo shminfo; + int req_width, req_height; } xv_frame_t; @@ -443,8 +444,8 @@ static void xv_update_frame_format (vo_driver_t *this_gen, width = (width + 7) & ~0x7; } - if ((frame->width != width) - || (frame->height != height) + if ((frame->req_width != width) + || (frame->req_height != height) || (frame->format != format)) { /* printf (LOG_MODULE ": updating frame to %d x %d (ratio=%d, format=%08x)\n",width,height,ratio_code,format); */ @@ -475,13 +476,21 @@ static void xv_update_frame_format (vo_driver_t *this_gen, frame->vo_frame.base[2] = frame->image->data + frame->image->offsets[1]; } - frame->width = width; - frame->height = height; + /* allocated frame size may not match requested size */ + frame->req_width = width; + frame->req_height = height; + frame->width = frame->image->width; + frame->height = frame->image->height; frame->format = format; UNLOCK_DISPLAY(this); } + if (frame->vo_frame.width > frame->width) + frame->vo_frame.width = frame->width; + if (frame->vo_frame.height > frame->height) + frame->vo_frame.height = frame->height; + frame->ratio = ratio; } |
