summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/mpegplayer')
-rw-r--r--apps/plugins/mpegplayer/disk_buf.h4
-rw-r--r--apps/plugins/mpegplayer/mpeg_parser.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/plugins/mpegplayer/disk_buf.h b/apps/plugins/mpegplayer/disk_buf.h
index 5be88f1..bc76ab6 100644
--- a/apps/plugins/mpegplayer/disk_buf.h
+++ b/apps/plugins/mpegplayer/disk_buf.h
@@ -27,6 +27,10 @@
#define OFF_T_MAX (~((off_t)1 << (sizeof (off_t)*8 - 1)))
#endif
+#ifndef OFF_T_MIN
+#define OFF_T_MIN ((off_t)1 << (sizeof (off_t)*8 - 1))
+#endif
+
#define DISK_BUF_PAGE_SHIFT 15 /* 32KB cache lines */
#define DISK_BUF_PAGE_SIZE (1 << DISK_BUF_PAGE_SHIFT)
#define DISK_BUF_PAGE_MASK (DISK_BUF_PAGE_SIZE-1)
diff --git a/apps/plugins/mpegplayer/mpeg_parser.c b/apps/plugins/mpegplayer/mpeg_parser.c
index 06fa01c..6883916 100644
--- a/apps/plugins/mpegplayer/mpeg_parser.c
+++ b/apps/plugins/mpegplayer/mpeg_parser.c
@@ -60,8 +60,8 @@ void str_end_of_stream(struct stream *str)
* its behalf. Set right to the min first so a thread reading the
* overall window gets doesn't see this as valid no matter what the
* file length. */
- str->hdr.win_right = LONG_MIN;
- str->hdr.win_left = LONG_MAX;
+ str->hdr.win_right = OFF_T_MIN;
+ str->hdr.win_left = OFF_T_MAX;
/* No packets */
str->curr_packet = str->curr_packet_end = NULL;
/* No flags */