2 http://code.google.com/p/gecko-mediaplayer/issues/detail?id=170
3 http://patches.libav.org/patch/18621/
5 --- mplayer/libmpdemux/demux_lavf.c.bak 2013-07-05 03:03:36.684099781 +0200
6 +++ mplayer/libmpdemux/demux_lavf.c 2013-07-05 03:04:40.447433846 +0200
8 pos += stream->end_pos;
9 else if(whence == SEEK_SET)
10 pos += stream->start_pos;
11 - else if(whence == AVSEEK_SIZE && stream->end_pos > 0)
12 + else if(whence == AVSEEK_SIZE && stream->end_pos > 0) {
14 + stream_control(demuxer->stream, STREAM_CTRL_GET_SIZE, &size);
15 + if (size > stream->end_pos)
16 + stream->end_pos = size;
17 return stream->end_pos - stream->start_pos;
22 --- mplayer/stream/cache2.c.bak 2013-07-05 03:00:03.010763995 +0200
23 +++ mplayer/stream/cache2.c 2013-07-05 03:03:18.380766237 +0200
28 - volatile unsigned control_uint_arg;
29 + volatile uint64_t control_uint_arg;
30 volatile double control_double_arg;
31 volatile struct stream_lang_req control_lang_arg;
32 volatile int control_res;
34 static int cache_execute_control(cache_vars_t *s) {
37 + unsigned uint64_res;
40 int quit = s->control == -2;
42 s->control_res = s->stream->control(s->stream, s->control, &uint_res);
43 s->control_uint_arg = uint_res;
45 + case STREAM_CTRL_GET_SIZE:
46 + s->control_res = s->stream->control(s->stream, s->control, &uint64_res);
47 + s->control_uint_arg = uint64_res;
49 case STREAM_CTRL_GET_LANG:
50 s->control_res = s->stream->control(s->stream, s->control, (void *)&s->control_lang_arg);
53 case STREAM_CTRL_GET_ASPECT_RATIO:
54 case STREAM_CTRL_GET_NUM_ANGLES:
55 case STREAM_CTRL_GET_ANGLE:
56 + case STREAM_CTRL_GET_SIZE:
61 case STREAM_CTRL_GET_ANGLE:
62 *(unsigned *)arg = s->control_uint_arg;
64 + case STREAM_CTRL_GET_SIZE:
65 + *(off_t *)arg = s->control_uint_arg;
67 case STREAM_CTRL_GET_LANG:
68 *(struct stream_lang_req *)arg = s->control_lang_arg;