diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2010-12-19 08:28:03 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2010-12-19 08:28:03 +0000 |
commit | 31af1a3ac21646c8f07b1b93e497d45a060ee36d (patch) | |
tree | 30b7541bd15a3291311c8d1b48b1b6a95d7a1ba5 /apps/plugins/mpegplayer/video_thread.c | |
parent | fd01bf3e4cfedf073824b1a98662932796b6cd32 (diff) | |
download | rockbox-31af1a3ac21646c8f07b1b93e497d45a060ee36d.tar.gz rockbox-31af1a3ac21646c8f07b1b93e497d45a060ee36d.zip |
MPEGPlayer: Move some code that's probably better situated in the stream manager rather than the parser. Fix visibility checking in video out. Extra message sending for new stream isn't needed; just do full decoder sequence reset when requesting dimensions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28855 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/video_thread.c')
-rw-r--r-- | apps/plugins/mpegplayer/video_thread.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/plugins/mpegplayer/video_thread.c b/apps/plugins/mpegplayer/video_thread.c index 4ccdc8b844..69d94f8ba0 100644 --- a/apps/plugins/mpegplayer/video_thread.c +++ b/apps/plugins/mpegplayer/video_thread.c | |||
@@ -124,7 +124,8 @@ static int video_str_scan(struct video_thread_data *td, | |||
124 | tmp_str.hdr.pos = sd->sk.pos; | 124 | tmp_str.hdr.pos = sd->sk.pos; |
125 | tmp_str.hdr.limit = sd->sk.pos + sd->sk.len; | 125 | tmp_str.hdr.limit = sd->sk.pos + sd->sk.len; |
126 | 126 | ||
127 | mpeg2_reset(td->mpeg2dec, false); | 127 | /* Fully reset if obtaining size for a new stream */ |
128 | mpeg2_reset(td->mpeg2dec, td->ev.id == VIDEO_GET_SIZE); | ||
128 | mpeg2_skip(td->mpeg2dec, 1); | 129 | mpeg2_skip(td->mpeg2dec, 1); |
129 | 130 | ||
130 | while (1) | 131 | while (1) |
@@ -503,12 +504,6 @@ static void video_thread_msg(struct video_thread_data *td) | |||
503 | reply = true; | 504 | reply = true; |
504 | break; | 505 | break; |
505 | 506 | ||
506 | case STREAM_CLOSE: | ||
507 | vo_cleanup(); | ||
508 | mpeg2_close(td->mpeg2dec); | ||
509 | reply = true; | ||
510 | break; | ||
511 | |||
512 | case VIDEO_DISPLAY_IS_VISIBLE: | 507 | case VIDEO_DISPLAY_IS_VISIBLE: |
513 | reply = vo_is_visible(); | 508 | reply = vo_is_visible(); |
514 | break; | 509 | break; |
@@ -605,8 +600,9 @@ static void video_thread_msg(struct video_thread_data *td) | |||
605 | case VIDEO_GET_SIZE: | 600 | case VIDEO_GET_SIZE: |
606 | { | 601 | { |
607 | if (td->state != TSTATE_INIT) | 602 | if (td->state != TSTATE_INIT) |
608 | break; | 603 | break; /* Can only use after a reset was issued */ |
609 | 604 | ||
605 | /* This will reset the decoder in full for this particular event */ | ||
610 | if (init_sequence(td)) | 606 | if (init_sequence(td)) |
611 | { | 607 | { |
612 | reply = true; | 608 | reply = true; |