]> git.pld-linux.org Git - packages/mplayer.git/commitdiff
- patched for growing files support (streaming media in gecko-mediaplayer)
authorŁukasz Krotowski <lkrotowski@pld-linux.org>
Fri, 5 Jul 2013 20:18:13 +0000 (22:18 +0200)
committerŁukasz Krotowski <lkrotowski@pld-linux.org>
Fri, 5 Jul 2013 20:18:13 +0000 (22:18 +0200)
mplayer-growing-files.patch [new file with mode: 0644]
mplayer.spec

diff --git a/mplayer-growing-files.patch b/mplayer-growing-files.patch
new file mode 100644 (file)
index 0000000..3f0f236
--- /dev/null
@@ -0,0 +1,69 @@
+Patch taken from:
+http://code.google.com/p/gecko-mediaplayer/issues/detail?id=170
+http://patches.libav.org/patch/18621/
+
+--- mplayer/libmpdemux/demux_lavf.c.bak        2013-07-05 03:03:36.684099781 +0200
++++ mplayer/libmpdemux/demux_lavf.c    2013-07-05 03:04:40.447433846 +0200
+@@ -105,8 +105,13 @@
+         pos += stream->end_pos;
+     else if(whence == SEEK_SET)
+         pos += stream->start_pos;
+-    else if(whence == AVSEEK_SIZE && stream->end_pos > 0)
++    else if(whence == AVSEEK_SIZE && stream->end_pos > 0) {
++              off_t size;
++              stream_control(demuxer->stream, STREAM_CTRL_GET_SIZE, &size);
++                      if (size > stream->end_pos)
++                              stream->end_pos = size;
+         return stream->end_pos - stream->start_pos;
++      }
+     else
+         return -1;
+--- mplayer/stream/cache2.c.bak        2013-07-05 03:00:03.010763995 +0200
++++ mplayer/stream/cache2.c    2013-07-05 03:03:18.380766237 +0200
+@@ -91,7 +91,7 @@
+   // callback
+   stream_t* stream;
+   volatile int control;
+-  volatile unsigned control_uint_arg;
++  volatile uint64_t control_uint_arg;
+   volatile double control_double_arg;
+   volatile struct stream_lang_req control_lang_arg;
+   volatile int control_res;
+@@ -264,6 +264,7 @@
+ static int cache_execute_control(cache_vars_t *s) {
+   double double_res;
+   unsigned uint_res;
++  unsigned uint64_res;
+   int needs_flush = 0;
+   static unsigned last;
+   int quit = s->control == -2;
+@@ -316,6 +317,10 @@
+       s->control_res = s->stream->control(s->stream, s->control, &uint_res);
+       s->control_uint_arg = uint_res;
+       break;
++      case STREAM_CTRL_GET_SIZE:
++        s->control_res = s->stream->control(s->stream, s->control, &uint64_res);
++        s->control_uint_arg = uint64_res;
++        break;
+     case STREAM_CTRL_GET_LANG:
+       s->control_res = s->stream->control(s->stream, s->control, (void *)&s->control_lang_arg);
+       break;
+@@ -640,6 +645,7 @@
+     case STREAM_CTRL_GET_ASPECT_RATIO:
+     case STREAM_CTRL_GET_NUM_ANGLES:
+     case STREAM_CTRL_GET_ANGLE:
++      case STREAM_CTRL_GET_SIZE:
+     case -2:
+       s->control = cmd;
+       break;
+@@ -680,6 +686,9 @@
+     case STREAM_CTRL_GET_ANGLE:
+       *(unsigned *)arg = s->control_uint_arg;
+       break;
++      case STREAM_CTRL_GET_SIZE:
++        *(off_t *)arg = s->control_uint_arg;
++        break;
+     case STREAM_CTRL_GET_LANG:
+       *(struct stream_lang_req *)arg = s->control_lang_arg;
+       break;
index 2fdbc31b100e0e4ad2d19542709dba2e0cf6db41..afeb371239b0066edab4907ff50ba2c7d2c47b08 100644 (file)
@@ -164,6 +164,7 @@ Patch31:    %{name}-350.patch
 # update, hard to fix right now because of gnome bug 579430:
 # https://bugzilla.gnome.org/show_bug.cgi?id=579430
 #Patch32:      %{name}-gnome-screensaver.patch
+Patch33:       %{name}-growing-files.patch
 
 Patch100:      %{name}-on2flix.patch
 Patch101:      %{name}-link.patch
@@ -416,6 +417,7 @@ cp -f etc/codecs.conf etc/codecs.win32.conf
 %patch30 -p0
 %patch31 -p1
 #%{with_gnomess:%patch32 -p1}
+%patch33 -p1
 
 # on2flix
 mv mencoder-on2flixenglinux{-*-*-*,}
This page took 0.154565 seconds and 4 git commands to generate.