diff options
Diffstat (limited to 'apps/plugins/mpegplayer')
-rw-r--r-- | apps/plugins/mpegplayer/mpeg_parser.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_parser.c b/apps/plugins/mpegplayer/mpeg_parser.c index 42c388b375..30793e0350 100644 --- a/apps/plugins/mpegplayer/mpeg_parser.c +++ b/apps/plugins/mpegplayer/mpeg_parser.c | |||
@@ -332,8 +332,10 @@ static void init_times(struct stream *str) | |||
332 | } | 332 | } |
333 | } | 333 | } |
334 | 334 | ||
335 | /* End must be greater than start */ | 335 | /* End must be greater than start. If the start PTS is found, the end PTS |
336 | if (str->start_pts >= str->end_pts) | 336 | * must be valid too. If the start PTS was invalid, then the end will never |
337 | * be scanned above. */ | ||
338 | if (str->start_pts >= str->end_pts || str->end_pts == INVALID_TIMESTAMP) | ||
337 | { | 339 | { |
338 | str->start_pts = INVALID_TIMESTAMP; | 340 | str->start_pts = INVALID_TIMESTAMP; |
339 | str->end_pts = INVALID_TIMESTAMP; | 341 | str->end_pts = INVALID_TIMESTAMP; |
@@ -1116,8 +1118,8 @@ int parser_init_stream(void) | |||
1116 | 1118 | ||
1117 | if (parse_demux(&video_str, STREAM_PM_RANDOM_ACCESS) == STREAM_OK) | 1119 | if (parse_demux(&video_str, STREAM_PM_RANDOM_ACCESS) == STREAM_OK) |
1118 | { | 1120 | { |
1119 | /* Found a video packet - assume transport stream */ | 1121 | /* Found a video packet - assume program stream */ |
1120 | str_parser.format = STREAM_FMT_MPEG_TS; | 1122 | str_parser.format = STREAM_FMT_MPEG_PS; |
1121 | str_parser.next_data = parse_demux; | 1123 | str_parser.next_data = parse_demux; |
1122 | } | 1124 | } |
1123 | else | 1125 | else |
@@ -1133,7 +1135,7 @@ int parser_init_stream(void) | |||
1133 | return STREAM_UNSUPPORTED; | 1135 | return STREAM_UNSUPPORTED; |
1134 | } | 1136 | } |
1135 | 1137 | ||
1136 | if (str_parser.format == STREAM_FMT_MPEG_TS) | 1138 | if (str_parser.format == STREAM_FMT_MPEG_PS) |
1137 | { | 1139 | { |
1138 | /* Initalize start_pts and end_pts with the length (in 45kHz units) of | 1140 | /* Initalize start_pts and end_pts with the length (in 45kHz units) of |
1139 | * the movie. INVALID_TIMESTAMP if the time could not be determined */ | 1141 | * the movie. INVALID_TIMESTAMP if the time could not be determined */ |