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.zip rockbox-31af1a3ac21646c8f07b1b93e497d45a060ee36d.tar.gz rockbox-31af1a3ac21646c8f07b1b93e497d45a060ee36d.tar.bz2 rockbox-31af1a3ac21646c8f07b1b93e497d45a060ee36d.tar.xz | |
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 4ccdc8b..69d94f8 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, tmp_str.hdr.pos = sd->sk.pos; tmp_str.hdr.limit = sd->sk.pos + sd->sk.len; - mpeg2_reset(td->mpeg2dec, false); + /* Fully reset if obtaining size for a new stream */ + mpeg2_reset(td->mpeg2dec, td->ev.id == VIDEO_GET_SIZE); mpeg2_skip(td->mpeg2dec, 1); while (1) @@ -503,12 +504,6 @@ static void video_thread_msg(struct video_thread_data *td) reply = true; break; - case STREAM_CLOSE: - vo_cleanup(); - mpeg2_close(td->mpeg2dec); - reply = true; - break; - case VIDEO_DISPLAY_IS_VISIBLE: reply = vo_is_visible(); break; @@ -605,8 +600,9 @@ static void video_thread_msg(struct video_thread_data *td) case VIDEO_GET_SIZE: { if (td->state != TSTATE_INIT) - break; + break; /* Can only use after a reset was issued */ + /* This will reset the decoder in full for this particular event */ if (init_sequence(td)) { reply = true; |