[packages/mplayer] - patched for growing files support (streaming media in gecko-mediaplayer)

lkrotowski lkrotowski at pld-linux.org
Fri Jul 5 22:43:33 CEST 2013


commit 3749cd326f3ef723409a7f2e64c7f50d8c529f81
Author: Łukasz Krotowski <lkrotowski at pld-linux.org>
Date:   Fri Jul 5 22:18:13 2013 +0200

    - patched for growing files support (streaming media in gecko-mediaplayer)

 mplayer-growing-files.patch | 69 +++++++++++++++++++++++++++++++++++++++++++++
 mplayer.spec                |  2 ++
 2 files changed, 71 insertions(+)
---
diff --git a/mplayer.spec b/mplayer.spec
index 2fdbc31..afeb371 100644
--- a/mplayer.spec
+++ b/mplayer.spec
@@ -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{-*-*-*,}
diff --git a/mplayer-growing-files.patch b/mplayer-growing-files.patch
new file mode 100644
index 0000000..3f0f236
--- /dev/null
+++ b/mplayer-growing-files.patch
@@ -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;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mplayer.git/commitdiff/3749cd326f3ef723409a7f2e64c7f50d8c529f81



More information about the pld-cvs-commit mailing list