diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2011-01-03 20:13:05 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2011-01-03 20:13:05 +0000 |
commit | a31b3701f8b69e8370219fac417248f254814446 (patch) | |
tree | 053cac4f505a68c4aa23d09110ed3134070b1922 | |
parent | b664f62e36b5f0ac296567e423816dab3811075d (diff) | |
download | rockbox-a31b3701f8b69e8370219fac417248f254814446.tar.gz rockbox-a31b3701f8b69e8370219fac417248f254814446.zip |
MPEGPlayer: Try a few timestamps for all streams at the beginning, not just video, to help deal with anomalous start PTS values in a stream. Hopefully the hardcoded number gives it enough tolerance.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28961 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/mpegplayer/mpeg_parser.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_parser.c b/apps/plugins/mpegplayer/mpeg_parser.c index b683efe1c9..572bd1b13e 100644 --- a/apps/plugins/mpegplayer/mpeg_parser.c +++ b/apps/plugins/mpegplayer/mpeg_parser.c | |||
@@ -289,8 +289,11 @@ static void init_times(struct stream *str) | |||
289 | 289 | ||
290 | str->start_pts = INVALID_TIMESTAMP; | 290 | str->start_pts = INVALID_TIMESTAMP; |
291 | 291 | ||
292 | /* Probe many for video because of B-frames */ | 292 | /* Probe for many for the start because a stamp or two could be anomalous. |
293 | for (i = STREAM_IS_VIDEO(str->id) ? 5 : 1; i > 0;) | 293 | * Video also can also have things out of order. How many? There isn't any |
294 | * "right" value but just a few seems suffient to filter some bad cases. | ||
295 | * Too many and file loading could take too long. */ | ||
296 | for (i = 5; i > 0;) | ||
294 | { | 297 | { |
295 | switch (parser_get_next_data(&tmp_str, STREAM_PM_RANDOM_ACCESS)) | 298 | switch (parser_get_next_data(&tmp_str, STREAM_PM_RANDOM_ACCESS)) |
296 | { | 299 | { |