diff options
-rw-r--r-- | apps/plugins/mpegplayer/mpegplayer.c | 4 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/video_out.h | 3 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/video_out_rockbox.c | 14 |
3 files changed, 12 insertions, 9 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index f4e2859e46..86145bb4b6 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c | |||
@@ -879,7 +879,9 @@ static void video_thread(void) | |||
879 | continue; | 879 | continue; |
880 | 880 | ||
881 | case STATE_SEQUENCE: | 881 | case STATE_SEQUENCE: |
882 | vo_setup(info->sequence->width, | 882 | vo_setup(info->sequence->display_width, |
883 | info->sequence->display_height, | ||
884 | info->sequence->width, | ||
883 | info->sequence->height, | 885 | info->sequence->height, |
884 | info->sequence->chroma_width, | 886 | info->sequence->chroma_width, |
885 | info->sequence->chroma_height); | 887 | info->sequence->chroma_height); |
diff --git a/apps/plugins/mpegplayer/video_out.h b/apps/plugins/mpegplayer/video_out.h index e29d0d775d..febb47e2ba 100644 --- a/apps/plugins/mpegplayer/video_out.h +++ b/apps/plugins/mpegplayer/video_out.h | |||
@@ -22,5 +22,6 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | void vo_draw_frame (uint8_t * const * buf); | 24 | void vo_draw_frame (uint8_t * const * buf); |
25 | void vo_setup (unsigned int width, unsigned int height, | 25 | void vo_setup (unsigned int display_width, unsigned int display_height, |
26 | unsigned int width, unsigned int height, | ||
26 | unsigned int chroma_width, unsigned int chroma_height); | 27 | unsigned int chroma_width, unsigned int chroma_height); |
diff --git a/apps/plugins/mpegplayer/video_out_rockbox.c b/apps/plugins/mpegplayer/video_out_rockbox.c index c4a37a6558..627222ded9 100644 --- a/apps/plugins/mpegplayer/video_out_rockbox.c +++ b/apps/plugins/mpegplayer/video_out_rockbox.c | |||
@@ -213,7 +213,7 @@ void vo_draw_frame (uint8_t * const * buf) | |||
213 | #define SCREEN_HEIGHT LCD_WIDTH | 213 | #define SCREEN_HEIGHT LCD_WIDTH |
214 | #endif | 214 | #endif |
215 | 215 | ||
216 | void vo_setup(unsigned int width, unsigned int height, | 216 | void vo_setup(unsigned int display_width, unsigned int display_height, unsigned int width, unsigned int height, |
217 | unsigned int chroma_width, unsigned int chroma_height) | 217 | unsigned int chroma_width, unsigned int chroma_height) |
218 | { | 218 | { |
219 | image_width=width; | 219 | image_width=width; |
@@ -221,19 +221,19 @@ void vo_setup(unsigned int width, unsigned int height, | |||
221 | image_chroma_x=image_width/chroma_width; | 221 | image_chroma_x=image_width/chroma_width; |
222 | image_chroma_y=image_height/chroma_height; | 222 | image_chroma_y=image_height/chroma_height; |
223 | 223 | ||
224 | if (image_width >= SCREEN_WIDTH) { | 224 | if (display_width >= SCREEN_WIDTH) { |
225 | output_width = SCREEN_WIDTH; | 225 | output_width = SCREEN_WIDTH; |
226 | output_x = 0; | 226 | output_x = 0; |
227 | } else { | 227 | } else { |
228 | output_width = image_width; | 228 | output_width = display_width; |
229 | output_x = (SCREEN_WIDTH-image_width)/2; | 229 | output_x = (SCREEN_WIDTH-display_width)/2; |
230 | } | 230 | } |
231 | 231 | ||
232 | if (image_height >= SCREEN_HEIGHT) { | 232 | if (display_height >= SCREEN_HEIGHT) { |
233 | output_height = SCREEN_HEIGHT; | 233 | output_height = SCREEN_HEIGHT; |
234 | output_y = 0; | 234 | output_y = 0; |
235 | } else { | 235 | } else { |
236 | output_height = image_height; | 236 | output_height = display_height; |
237 | output_y = (SCREEN_HEIGHT-image_height)/2; | 237 | output_y = (SCREEN_HEIGHT-display_height)/2; |
238 | } | 238 | } |
239 | } | 239 | } |