diff options
Diffstat (limited to 'apps/plugins/mpegplayer')
-rw-r--r-- | apps/plugins/mpegplayer/mpegplayer.c | 7 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/video_out.h | 4 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/video_out_rockbox.c | 23 |
3 files changed, 13 insertions, 21 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index 86145bb4b6..a2e22ed2bd 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c | |||
@@ -879,12 +879,7 @@ static void video_thread(void) | |||
879 | continue; | 879 | continue; |
880 | 880 | ||
881 | case STATE_SEQUENCE: | 881 | case STATE_SEQUENCE: |
882 | vo_setup(info->sequence->display_width, | 882 | vo_setup(info->sequence); |
883 | info->sequence->display_height, | ||
884 | info->sequence->width, | ||
885 | info->sequence->height, | ||
886 | info->sequence->chroma_width, | ||
887 | info->sequence->chroma_height); | ||
888 | mpeg2_skip (mpeg2dec, false); | 883 | mpeg2_skip (mpeg2dec, false); |
889 | 884 | ||
890 | break; | 885 | break; |
diff --git a/apps/plugins/mpegplayer/video_out.h b/apps/plugins/mpegplayer/video_out.h index febb47e2ba..0d91eb7b1c 100644 --- a/apps/plugins/mpegplayer/video_out.h +++ b/apps/plugins/mpegplayer/video_out.h | |||
@@ -22,6 +22,4 @@ | |||
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 display_width, unsigned int display_height, | 25 | void vo_setup (const mpeg2_sequence_t * sequence); |
26 | unsigned int width, unsigned int 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 627222ded9..e3f8ba0264 100644 --- a/apps/plugins/mpegplayer/video_out_rockbox.c +++ b/apps/plugins/mpegplayer/video_out_rockbox.c | |||
@@ -213,27 +213,26 @@ 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 display_width, unsigned int display_height, unsigned int width, unsigned int height, | 216 | void vo_setup(const mpeg2_sequence_t * sequence) |
217 | unsigned int chroma_width, unsigned int chroma_height) | ||
218 | { | 217 | { |
219 | image_width=width; | 218 | image_width=sequence->width; |
220 | image_height=height; | 219 | image_height=sequence->height; |
221 | image_chroma_x=image_width/chroma_width; | 220 | image_chroma_x=image_width/sequence->chroma_width; |
222 | image_chroma_y=image_height/chroma_height; | 221 | image_chroma_y=image_height/sequence->chroma_height; |
223 | 222 | ||
224 | if (display_width >= SCREEN_WIDTH) { | 223 | if (sequence->display_width >= SCREEN_WIDTH) { |
225 | output_width = SCREEN_WIDTH; | 224 | output_width = SCREEN_WIDTH; |
226 | output_x = 0; | 225 | output_x = 0; |
227 | } else { | 226 | } else { |
228 | output_width = display_width; | 227 | output_width = sequence->display_width; |
229 | output_x = (SCREEN_WIDTH-display_width)/2; | 228 | output_x = (SCREEN_WIDTH-sequence->display_width)/2; |
230 | } | 229 | } |
231 | 230 | ||
232 | if (display_height >= SCREEN_HEIGHT) { | 231 | if (sequence->display_height >= SCREEN_HEIGHT) { |
233 | output_height = SCREEN_HEIGHT; | 232 | output_height = SCREEN_HEIGHT; |
234 | output_y = 0; | 233 | output_y = 0; |
235 | } else { | 234 | } else { |
236 | output_height = display_height; | 235 | output_height = sequence->display_height; |
237 | output_y = (SCREEN_HEIGHT-display_height)/2; | 236 | output_y = (SCREEN_HEIGHT-sequence->display_height)/2; |
238 | } | 237 | } |
239 | } | 238 | } |