parent
d46d8194a4
commit
f8397a36e6
@ -0,0 +1 @@
|
|||||||
|
/libmms-*.tar.gz
|
@ -0,0 +1,28 @@
|
|||||||
|
From b9bbe17c08e5dcbe3ce841e6bed52ce8d8b10f9e Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Lindgren <john.lindgren@aol.com>
|
||||||
|
Date: Thu, 29 May 2014 22:42:53 -0400
|
||||||
|
Subject: [PATCH 1/8] Remove "Requires: glib-2.0" since libmms no longer
|
||||||
|
depends on GLib.
|
||||||
|
|
||||||
|
Signed-off-by: Hans de Goede <j.w.r.degoede@gmail.com>
|
||||||
|
---
|
||||||
|
pkgconfig/libmms.pc.in | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pkgconfig/libmms.pc.in b/pkgconfig/libmms.pc.in
|
||||||
|
index 602c967..a86d15a 100644
|
||||||
|
--- a/pkgconfig/libmms.pc.in
|
||||||
|
+++ b/pkgconfig/libmms.pc.in
|
||||||
|
@@ -4,8 +4,7 @@ libdir=@libdir@
|
||||||
|
includedir=@includedir@/
|
||||||
|
|
||||||
|
Name: libmms
|
||||||
|
-Description: Library implementing the MMS protocol
|
||||||
|
-Requires: glib-2.0
|
||||||
|
+Description: Library implementing the MMS protocol
|
||||||
|
Version: @VERSION@
|
||||||
|
Libs: -L${libdir} -lmms -lm
|
||||||
|
Cflags: -I${includedir}
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
@ -0,0 +1,192 @@
|
|||||||
|
From 34060b0c0cb13eed323577becf72a13b43654c00 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Amit <chauhanamit067@users.sourceforge.net>
|
||||||
|
Date: Thu, 19 Nov 2015 13:35:30 +0100
|
||||||
|
Subject: [PATCH 2/8] Add a new testfiledownload.c example
|
||||||
|
|
||||||
|
New test code which connects to a mms url and downloads this as a file
|
||||||
|
to the local machine using mmsx_connect and mmsx_get_length().
|
||||||
|
---
|
||||||
|
src/Makefile.am | 4 +-
|
||||||
|
src/testdownload.c | 29 ----------
|
||||||
|
src/testfiledownload.c | 114 +++++++++++++++++++++++++++++++++++++++
|
||||||
|
src/teststreamdownload.c | 29 ++++++++++
|
||||||
|
4 files changed, 145 insertions(+), 31 deletions(-)
|
||||||
|
delete mode 100644 src/testdownload.c
|
||||||
|
create mode 100644 src/testfiledownload.c
|
||||||
|
create mode 100644 src/teststreamdownload.c
|
||||||
|
|
||||||
|
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||||
|
index 4fbb5c0..295cc34 100644
|
||||||
|
--- a/src/Makefile.am
|
||||||
|
+++ b/src/Makefile.am
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-# noinst_PROGRAMS = testconnect testdownload testswap
|
||||||
|
+# noinst_PROGRAMS = testconnect testfiledownload teststreamdownload testswap
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = libmms.la
|
||||||
|
|
||||||
|
@@ -46,5 +46,5 @@ INCLUDES = \
|
||||||
|
DEPS = $(top_builddir)/src/libmms.la
|
||||||
|
LDADD = $(top_builddir)/src/libmms.la
|
||||||
|
|
||||||
|
-# libmms_test_SOURCES = testconnect.c testdownload.c testswap.c
|
||||||
|
+# libmms_test_SOURCES = testconnect.c testfiledownload.c teststreamdownload.c testswap.c
|
||||||
|
# libmms_test_LDADD = $(LDADD)
|
||||||
|
diff --git a/src/testfiledownload.c b/src/testfiledownload.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..cfef631
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/testfiledownload.c
|
||||||
|
@@ -0,0 +1,114 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2002-2004 the xine project
|
||||||
|
+ * Copyright (C) 2004-2012 the libmms project
|
||||||
|
+ *
|
||||||
|
+ * This file is part of LibMMS, an MMS protocol handling library.
|
||||||
|
+ * This file was originally a part of xine, a free video player.
|
||||||
|
+ *
|
||||||
|
+ * Libmms is free software; you can redistribute it and/or modify it
|
||||||
|
+ * under the terms of the GNU Library General Public License as
|
||||||
|
+ * published by the Free Software Foundation; either version 2 of the
|
||||||
|
+ * License, or (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * Libmms is distributed in the hope that it will be useful,
|
||||||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ * GNU General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * You should have received a copy of the GNU Library General Public
|
||||||
|
+ * License along with this program; if not, write to the Free Software
|
||||||
|
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
+ * 02111-1307, USA
|
||||||
|
+ * This file is created by : Amit Kumar (amit3.kumar@samsung.com)
|
||||||
|
+*/
|
||||||
|
+
|
||||||
|
+/* Sample program: Connect a mms URL and download media file on local machine. */
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+#include<stdio.h>
|
||||||
|
+
|
||||||
|
+#include "mms.h"
|
||||||
|
+#include "mmsx.h"
|
||||||
|
+
|
||||||
|
+#define ERROR 1
|
||||||
|
+
|
||||||
|
+// Working MMS URL
|
||||||
|
+
|
||||||
|
+const char *url = "mms://a1014.v1252931.c125293.g.vm.akamaistream.net/7/1014/125293/v0001/wm.od.origin.zdf.de.gl-systemhaus.de/none/zdf/09/09/090925_hinweis_geo_de_vh.wmv";
|
||||||
|
+
|
||||||
|
+int main()
|
||||||
|
+{
|
||||||
|
+ mmsx_t * pMMSX = NULL;
|
||||||
|
+ FILE* localFileHandle;
|
||||||
|
+ int loop, readMediaResult;
|
||||||
|
+ const char *localMediaName = "/tmp/mmsdownload.wmv";
|
||||||
|
+ char buf[1024];
|
||||||
|
+
|
||||||
|
+ //Here we make a connection to the passed URL.
|
||||||
|
+
|
||||||
|
+ if(pMMSX = mmsx_connect(NULL, NULL, url, 1024))
|
||||||
|
+ {
|
||||||
|
+ printf("Connect OK\n");
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ printf("Not connected\n");
|
||||||
|
+
|
||||||
|
+ return ERROR;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ //Open file handler for local media file.
|
||||||
|
+
|
||||||
|
+ localFileHandle = fopen(localMediaName, "w");
|
||||||
|
+
|
||||||
|
+ if(!localFileHandle)
|
||||||
|
+ {
|
||||||
|
+ printf("Cannot open file to write\n");
|
||||||
|
+ return ERROR;
|
||||||
|
+ }
|
||||||
|
+ /*
|
||||||
|
+ **
|
||||||
|
+ * mmsx_get_time_length() function will calculate the time
|
||||||
|
+ * duration of media file.
|
||||||
|
+ **
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+ printf("Time duration of media file = %lf\n",mmsx_get_time_length(pMMSX));
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ **
|
||||||
|
+ * This loop will iterate total media length i.e. media size
|
||||||
|
+ * divided by buffer size. In our case buffer size is 1024.
|
||||||
|
+ **
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+ for(loop = 0; loop < mmsx_get_length(pMMSX)/1024; loop++)
|
||||||
|
+ {
|
||||||
|
+ readMediaResult = mmsx_read (NULL, pMMSX, buf,1024);
|
||||||
|
+ if(!readMediaResult)
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
+ //Finally, writing local media file.
|
||||||
|
+
|
||||||
|
+ fwrite(buf, 1, readMediaResult, localFileHandle);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ // For print only
|
||||||
|
+
|
||||||
|
+ if(loop > 0)
|
||||||
|
+ {
|
||||||
|
+ printf("Reading file successfully and reading the file %d times\n", loop);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ printf("Failed to read from stream\n");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ //closed opend handler here.
|
||||||
|
+
|
||||||
|
+ fclose(localFileHandle);
|
||||||
|
+ mmsx_close(pMMSX);
|
||||||
|
+}
|
||||||
|
diff --git a/src/teststreamdownload.c b/src/teststreamdownload.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..21d2d56
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/teststreamdownload.c
|
||||||
|
@@ -0,0 +1,29 @@
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include "mms.h"
|
||||||
|
+
|
||||||
|
+const char *url = "mms://od-msn.msn.com/3/mbr/apprentice_bts.wmv";
|
||||||
|
+
|
||||||
|
+int main(int argc, char *argv[])
|
||||||
|
+{
|
||||||
|
+ mms_t *this = NULL;
|
||||||
|
+ char buf[1024];
|
||||||
|
+ int i, res;
|
||||||
|
+ FILE* f;
|
||||||
|
+
|
||||||
|
+ if((this = mms_connect(NULL, NULL, url, 1)))
|
||||||
|
+ printf("Connect OK\n");
|
||||||
|
+ f = fopen("/tmp/mmsdownload.test", "w");
|
||||||
|
+ for(i = 0; i < 10000; i++)
|
||||||
|
+ {
|
||||||
|
+ res = mms_read(NULL, this, buf, 1024);
|
||||||
|
+ if(!res)
|
||||||
|
+ break;
|
||||||
|
+ fwrite(buf, 1, res, f);
|
||||||
|
+ }
|
||||||
|
+ if(i > 0)
|
||||||
|
+ printf("OK, read %d times\n", i);
|
||||||
|
+ else
|
||||||
|
+ printf("Failed to read from stream\n");
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
@ -0,0 +1,70 @@
|
|||||||
|
From 67d54003b8075b8ea8102bc4a808df4543ab113a Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Lindgren <john.lindgren@tds.net>
|
||||||
|
Date: Thu, 19 Nov 2015 13:39:27 +0100
|
||||||
|
Subject: [PATCH 3/8] Fix build if strndup() is missing
|
||||||
|
|
||||||
|
---
|
||||||
|
configure.in | 1 +
|
||||||
|
src/uri.c | 27 +++++++++++++++++++++++++++
|
||||||
|
2 files changed, 28 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/configure.in b/configure.in
|
||||||
|
index 86b0e08..9209523 100755
|
||||||
|
--- a/configure.in
|
||||||
|
+++ b/configure.in
|
||||||
|
@@ -14,6 +14,7 @@ AC_PROG_INSTALL
|
||||||
|
|
||||||
|
dnl Checks for header files.
|
||||||
|
AC_CHECK_HEADERS([sys/socket.h netinet/in.h netdb.h windows.h winsock2.h])
|
||||||
|
+AC_CHECK_FUNCS([strndup])
|
||||||
|
|
||||||
|
case $host in
|
||||||
|
*beos*)
|
||||||
|
diff --git a/src/uri.c b/src/uri.c
|
||||||
|
index a96b900..ec28f3c 100644
|
||||||
|
--- a/src/uri.c
|
||||||
|
+++ b/src/uri.c
|
||||||
|
@@ -17,6 +17,10 @@
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#ifdef HAVE_CONFIG_H
|
||||||
|
+#include "config.h"
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
@@ -125,6 +129,29 @@ for ($i = 0; $i < 32; $i++)
|
||||||
|
#define ISSPACE(C) (((C) >= 9 && (C) <= 13) || (C) == ' ')
|
||||||
|
|
||||||
|
|
||||||
|
+/* Implement the strndup function.
|
||||||
|
+ Copyright (C) 2005 Free Software Foundation, Inc.
|
||||||
|
+ Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>. */
|
||||||
|
+#ifndef HAVE_STRNDUP
|
||||||
|
+char *
|
||||||
|
+strndup (const char *s, size_t n)
|
||||||
|
+{
|
||||||
|
+ char *result;
|
||||||
|
+ size_t len = strlen (s);
|
||||||
|
+
|
||||||
|
+ if (n < len)
|
||||||
|
+ len = n;
|
||||||
|
+
|
||||||
|
+ result = (char *) malloc (len + 1);
|
||||||
|
+ if (!result)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ result[len] = '\0';
|
||||||
|
+ return (char *) memcpy (result, s, len);
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+
|
||||||
|
static int split_user_passwd(const char* in, char** user, char** passwd)
|
||||||
|
{
|
||||||
|
char *pass, *tmp = g_strdup(in);
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
From 5cface3df0e0213d8bc593d82a9a7c1e648dd71a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mahendra Narvariya <mahendra84@users.sourceforge.net>
|
||||||
|
Date: Thu, 19 Nov 2015 13:42:30 +0100
|
||||||
|
Subject: [PATCH 4/8] Patch to remove redundant comparison in file mmsh.c
|
||||||
|
|
||||||
|
Variable uri can not be NULL at line no 665 as NULL check is already
|
||||||
|
applied at line no 625.
|
||||||
|
---
|
||||||
|
src/mmsh.c | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/mmsh.c b/src/mmsh.c
|
||||||
|
index a019f05..dc17c9d 100755
|
||||||
|
--- a/src/mmsh.c
|
||||||
|
+++ b/src/mmsh.c
|
||||||
|
@@ -662,10 +662,10 @@ mmsh_t *mmsh_connect (mms_io_t *io, void *data, const char *url, int bandwidth)
|
||||||
|
gnet_uri_delete(proxy_uri);
|
||||||
|
proxy_uri = NULL;
|
||||||
|
}
|
||||||
|
- if (uri) {
|
||||||
|
- gnet_uri_delete(uri);
|
||||||
|
- uri = NULL;
|
||||||
|
- }
|
||||||
|
+
|
||||||
|
+ gnet_uri_delete(uri);
|
||||||
|
+ uri = NULL;
|
||||||
|
+
|
||||||
|
if (!mms_valid_proto(this->proto)) {
|
||||||
|
lprintf("unsupported protocol\n");
|
||||||
|
goto fail;
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From 8b5e303fc1f01521c727e351270dd68c4f15190b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mahendra Narvariya <mahendra84@users.sourceforge.net>
|
||||||
|
Date: Thu, 19 Nov 2015 13:45:52 +0100
|
||||||
|
Subject: [PATCH 5/8] Avoid possible overflow in sprintf
|
||||||
|
|
||||||
|
Avoid possible overflow in sprintf, better to use snprintf.
|
||||||
|
---
|
||||||
|
src/mms.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/mms.c b/src/mms.c
|
||||||
|
index c1dbc29..579c3f0 100644
|
||||||
|
--- a/src/mms.c
|
||||||
|
+++ b/src/mms.c
|
||||||
|
@@ -772,8 +772,8 @@ mms_t *mms_connect (mms_io_t *io, void *data, const char *url, int bandwidth) {
|
||||||
|
mms_buffer_init(&command_buffer, this->scmd_body);
|
||||||
|
mms_buffer_put_32 (&command_buffer, 0x0003001C);
|
||||||
|
mms_gen_guid(this->guid);
|
||||||
|
- sprintf(this->str, "NSPlayer/7.0.0.1956; {%s}; Host: %s", this->guid,
|
||||||
|
- this->connect_host);
|
||||||
|
+ snprintf(this->str, sizeof(this->str), "NSPlayer/7.0.0.1956; {%s}; Host: %s",
|
||||||
|
+ this->guid, this->connect_host);
|
||||||
|
res = mms_utf8_to_utf16le(this->scmd_body + command_buffer.pos,
|
||||||
|
CMD_BODY_LEN - command_buffer.pos,
|
||||||
|
this->str);
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From 03fa0e92467f56028944e04478b19845c03daafd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mahendra Narvariya <mahendra84@users.sourceforge.net>
|
||||||
|
Date: Thu, 19 Nov 2015 14:03:40 +0100
|
||||||
|
Subject: [PATCH 6/8] Fix possible NULL Pointer deref in mmsh.c
|
||||||
|
|
||||||
|
---
|
||||||
|
src/mmsh.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/mmsh.c b/src/mmsh.c
|
||||||
|
index dc17c9d..918e0a3 100755
|
||||||
|
--- a/src/mmsh.c
|
||||||
|
+++ b/src/mmsh.c
|
||||||
|
@@ -603,6 +603,11 @@ mmsh_t *mmsh_connect (mms_io_t *io, void *data, const char *url, int bandwidth)
|
||||||
|
*/
|
||||||
|
this = calloc(1, sizeof(mmsh_t));
|
||||||
|
|
||||||
|
+ if (!this) {
|
||||||
|
+ lprintf("error, calloc failed\n");
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
this->url = strdup(url);
|
||||||
|
if ((proxy_env = getenv("http_proxy")) != NULL)
|
||||||
|
this->proxy_url = strdup(proxy_env);
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
@ -0,0 +1,56 @@
|
|||||||
|
From 5d39f692d55c04839be78e470820f49d53e40bcb Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||||
|
Date: Wed, 27 Mar 2019 02:14:03 +0100
|
||||||
|
Subject: [PATCH 7/8] Add check for <sys/select.h> and use it
|
||||||
|
|
||||||
|
POSIX says it's required for 'fd_set', and Haiku needs it.
|
||||||
|
---
|
||||||
|
configure.in | 2 +-
|
||||||
|
src/mms.c | 3 +++
|
||||||
|
src/mmsh.c | 3 +++
|
||||||
|
3 files changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/configure.in b/configure.in
|
||||||
|
index 9209523..7434885 100755
|
||||||
|
--- a/configure.in
|
||||||
|
+++ b/configure.in
|
||||||
|
@@ -13,7 +13,7 @@ AC_PROG_LIBTOOL
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
|
||||||
|
dnl Checks for header files.
|
||||||
|
-AC_CHECK_HEADERS([sys/socket.h netinet/in.h netdb.h windows.h winsock2.h])
|
||||||
|
+AC_CHECK_HEADERS([sys/select.h sys/socket.h netinet/in.h netdb.h windows.h winsock2.h])
|
||||||
|
AC_CHECK_FUNCS([strndup])
|
||||||
|
|
||||||
|
case $host in
|
||||||
|
diff --git a/src/mms.c b/src/mms.c
|
||||||
|
index 579c3f0..bbeeb68 100644
|
||||||
|
--- a/src/mms.c
|
||||||
|
+++ b/src/mms.c
|
||||||
|
@@ -52,6 +52,9 @@
|
||||||
|
#endif
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
+#ifdef HAVE_SYS_SELECT_H
|
||||||
|
+#include <sys/select.h>
|
||||||
|
+#endif
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <errno.h>
|
||||||
|
diff --git a/src/mmsh.c b/src/mmsh.c
|
||||||
|
index 918e0a3..cfaad94 100755
|
||||||
|
--- a/src/mmsh.c
|
||||||
|
+++ b/src/mmsh.c
|
||||||
|
@@ -55,6 +55,9 @@
|
||||||
|
#endif
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
+#ifdef HAVE_SYS_SELECT_H
|
||||||
|
+#include <sys/select.h>
|
||||||
|
+#endif
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <errno.h>
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
@ -0,0 +1,55 @@
|
|||||||
|
From a9f692323e597324e6f01263c12b6f4290d5b56f Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||||
|
Date: Wed, 27 Mar 2019 02:14:37 +0100
|
||||||
|
Subject: [PATCH 8/8] C89 fixes for Haiku
|
||||||
|
|
||||||
|
---
|
||||||
|
src/mms-common-funcs.h | 14 +++++++++-----
|
||||||
|
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/mms-common-funcs.h b/src/mms-common-funcs.h
|
||||||
|
index 9e3c21d..f273756 100644
|
||||||
|
--- a/src/mms-common-funcs.h
|
||||||
|
+++ b/src/mms-common-funcs.h
|
||||||
|
@@ -205,12 +205,14 @@ static void interp_asf_header(TYPE *this)
|
||||||
|
|
||||||
|
case GUID_ASF_HEADER_EXTENSION:
|
||||||
|
{
|
||||||
|
+ int size;
|
||||||
|
+ int j = 24 + 18 + 4;
|
||||||
|
+ int l;
|
||||||
|
+
|
||||||
|
if ((24 + 18 + 4) > length)
|
||||||
|
break;
|
||||||
|
|
||||||
|
- int size = LE_32(this->asf_header + i + 24 + 18);
|
||||||
|
- int j = 24 + 18 + 4;
|
||||||
|
- int l;
|
||||||
|
+ size = LE_32(this->asf_header + i + 24 + 18);
|
||||||
|
lprintf("Extension header data size: %d\n", size);
|
||||||
|
|
||||||
|
while ((j + 24) <= length) {
|
||||||
|
@@ -249,16 +251,18 @@ static void interp_asf_header(TYPE *this)
|
||||||
|
|
||||||
|
// Loop through the number of extension system info
|
||||||
|
for (x = 0; x < ext_count && (ext_j + 22) <= l; x++) {
|
||||||
|
+ int len;
|
||||||
|
ext_j += 18;
|
||||||
|
- int len = LE_16(this->asf_header + i + j + ext_j);
|
||||||
|
+ len = LE_16(this->asf_header + i + j + ext_j);
|
||||||
|
ext_j += 4 + len;
|
||||||
|
}
|
||||||
|
|
||||||
|
lprintf("ext_j: %d\n", ext_j);
|
||||||
|
// Finally, we arrive at the interesting point: The optional Stream Property Object
|
||||||
|
if ((ext_j + 24) <= l) {
|
||||||
|
+ int len;
|
||||||
|
guid = get_guid(this->asf_header, i + j + ext_j);
|
||||||
|
- int len = LE_64(this->asf_header + i + j + ext_j + 16);
|
||||||
|
+ len = LE_64(this->asf_header + i + j + ext_j + 16);
|
||||||
|
if (guid == GUID_ASF_STREAM_PROPERTIES &&
|
||||||
|
(ext_j + len) <= l) {
|
||||||
|
interp_stream_properties(this, i + j + ext_j + 24);
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
@ -0,0 +1,230 @@
|
|||||||
|
Name: libmms
|
||||||
|
Version: 0.6.4
|
||||||
|
Release: 24%{?dist}
|
||||||
|
Summary: Library for Microsoft Media Server (MMS) streaming protocol
|
||||||
|
License: LGPL-2.1-or-later
|
||||||
|
URL: https://www.sf.net/projects/libmms
|
||||||
|
Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||||
|
# https://sourceforge.net/p/libmms/code/ci/b9bbe17c08e5dcbe3ce841e6bed52ce8d8b10f9e/
|
||||||
|
Patch1: 0001-Remove-Requires-glib-2.0-since-libmms-no-longer-depe.patch
|
||||||
|
# https://sourceforge.net/p/libmms/code/ci/34060b0c0cb13eed323577becf72a13b43654c00/
|
||||||
|
Patch2: 0002-Add-a-new-testfiledownload.c-example.patch
|
||||||
|
# https://sourceforge.net/p/libmms/code/ci/67d54003b8075b8ea8102bc4a808df4543ab113a/
|
||||||
|
Patch3: 0003-Fix-build-if-strndup-is-missing.patch
|
||||||
|
# https://sourceforge.net/p/libmms/code/ci/5cface3df0e0213d8bc593d82a9a7c1e648dd71a/
|
||||||
|
Patch4: 0004-Patch-to-remove-redundant-comparison-in-file-mmsh.c.patch
|
||||||
|
# https://sourceforge.net/p/libmms/code/ci/8b5e303fc1f01521c727e351270dd68c4f15190b/
|
||||||
|
Patch5: 0005-Avoid-possible-overflow-in-sprintf.patch
|
||||||
|
# https://sourceforge.net/p/libmms/code/ci/5cface3df0e0213d8bc593d82a9a7c1e648dd71a/
|
||||||
|
Patch6: 0006-Fix-possible-NULL-Pointer-deref-in-mmsh.c.patch
|
||||||
|
# https://sourceforge.net/p/libmms/code/ci/5d39f692d55c04839be78e470820f49d53e40bcb/
|
||||||
|
Patch7: 0007-Add-check-for-sys-select.h-and-use-it.patch
|
||||||
|
# https://sourceforge.net/p/libmms/code/ci/a9f692323e597324e6f01263c12b6f4290d5b56f/
|
||||||
|
Patch8: 0008-C89-fixes-for-Haiku.patch
|
||||||
|
|
||||||
|
BuildRequires: autoconf
|
||||||
|
BuildRequires: automake
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: libtool
|
||||||
|
BuildRequires: make
|
||||||
|
|
||||||
|
%description
|
||||||
|
MMS is a streaming protocol used in Microsoft server products, commonly used to
|
||||||
|
stream WMV data. You can encounter mms:// style URLs all over the net,
|
||||||
|
especially on news sites and other content-serving sites. Libmms allows you to
|
||||||
|
download content from such sites, making it easy to add MMS support to your
|
||||||
|
media applications.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development package for %{name}
|
||||||
|
Requires: %{name}%{_isa} = %{version}-%{release}
|
||||||
|
Requires: pkgconf-pkg-config
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package contains development files for %{name}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
chmod -x ChangeLog src/mmsh.c
|
||||||
|
|
||||||
|
%build
|
||||||
|
./autogen.sh
|
||||||
|
%configure --disable-static
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
rm %{buildroot}%{_libdir}/%{name}.la
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc AUTHORS ChangeLog README*
|
||||||
|
%license COPYING.LIB
|
||||||
|
%{_libdir}/%{name}.so.0{,.*}
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_includedir}/%{name}
|
||||||
|
%{_libdir}/%{name}.so
|
||||||
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Aug 25 2023 Dominik Mierzejewski <dominik@greysector.net> - 0.6.4-24
|
||||||
|
- add explicit build dependencies
|
||||||
|
- use a modern pkgconf runtime dependency
|
||||||
|
- annotate upstream patch origin
|
||||||
|
|
||||||
|
* Wed Aug 16 2023 Dominik Mierzejewski <dominik@greysector.net> - 0.6.4-23
|
||||||
|
- fix license field
|
||||||
|
|
||||||
|
* Fri Aug 04 2023 Dominik Mierzejewski <dominik@greysector.net> - 0.6.4-22
|
||||||
|
- adopt for Fedora
|
||||||
|
- hard-code ABI SONAME to avoid inadvertent breaks
|
||||||
|
- use SPDX identifier
|
||||||
|
- fix spurious executable permission
|
||||||
|
- drop redundant configure flag
|
||||||
|
|
||||||
|
* Wed Aug 02 2023 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 0.6.4-21
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Feb 25 2023 Sérgio Basto <sergio@serjux.com> - 0.6.4-20
|
||||||
|
- Remove option Werror was added by mistake
|
||||||
|
|
||||||
|
* Sat Feb 25 2023 Sérgio Basto <sergio@serjux.com> - 0.6.4-19
|
||||||
|
- Add last 8 commits from upstream
|
||||||
|
|
||||||
|
* Sun Aug 07 2022 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 0.6.4-18
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg
|
||||||
|
5.1
|
||||||
|
|
||||||
|
* Wed Feb 09 2022 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 0.6.4-17
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Aug 03 2021 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 0.6.4-16
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Feb 03 2021 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 0.6.4-15
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Aug 18 2020 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 0.6.4-14
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Mar 12 2020 Leigh Scott <leigh123linux@gmail.com> - 0.6.4-13
|
||||||
|
- Rebuilt for i686
|
||||||
|
|
||||||
|
* Tue Feb 04 2020 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 0.6.4-12
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Aug 09 2019 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 0.6.4-11
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Mar 06 2019 Hans de Goede <j.w.r.degoede@gmail.com> - 0.6.4-10
|
||||||
|
- Fix FTBFS on ppc64le
|
||||||
|
|
||||||
|
* Mon Mar 04 2019 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 0.6.4-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Nov 21 2018 Nicolas Chauvet <kwizart@gmail.com> - 0.6.4-8
|
||||||
|
- Spec file clean-up
|
||||||
|
|
||||||
|
* Thu Jul 26 2018 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 0.6.4-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Mar 01 2018 RPM Fusion Release Engineering <leigh123linux@googlemail.com> - 0.6.4-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Aug 31 2017 RPM Fusion Release Engineering <kwizart@rpmfusion.org> - 0.6.4-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Mar 19 2017 RPM Fusion Release Engineering <kwizart@rpmfusion.org> - 0.6.4-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Sep 01 2014 Sérgio Basto <sergio@serjux.com> - 0.6.4-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jun 15 2014 Hans de Goede <j.w.r.degoede@gmail.com> - 0.6.4-2
|
||||||
|
- Add patch from upstream to drop glib requires from the pkg-config file
|
||||||
|
(rhbz#1109495)
|
||||||
|
|
||||||
|
* Thu Apr 10 2014 Hans de Goede <j.w.r.degoede@gmail.com> - 0.6.4-1
|
||||||
|
- New upstream bugfix release 0.6.4
|
||||||
|
|
||||||
|
* Sun Apr 06 2014 Hans de Goede <j.w.r.degoede@gmail.com> - 0.6.3-1
|
||||||
|
- New upstream bugfix release 0.6.3
|
||||||
|
|
||||||
|
* Sun Mar 03 2013 Nicolas Chauvet <kwizart@gmail.com> - 0.6.2-3
|
||||||
|
- Mass rebuilt for Fedora 19 Features
|
||||||
|
|
||||||
|
* Wed Jan 25 2012 Nicolas Chauvet <kwizart@gmail.com> - 0.6.2-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 19 2011 Hans de Goede <j.w.r.degoede@hhs.nl> 0.6.2-1
|
||||||
|
- New upstream bugfix release 0.6.2
|
||||||
|
|
||||||
|
* Tue Jan 11 2011 Hans de Goede <j.w.r.degoede@hhs.nl> 0.6.1-1
|
||||||
|
- New upstream bugfix release 0.6.1
|
||||||
|
- Fixes the use of the this reserved keyword in public headers (rf1596)
|
||||||
|
|
||||||
|
* Sun May 30 2010 Hans de Goede <j.w.r.degoede@hhs.nl> 0.6-1
|
||||||
|
- New upstream release 0.6
|
||||||
|
- Update URL (upstream has moved back to sf.net)
|
||||||
|
|
||||||
|
* Thu Feb 18 2010 Hans de Goede <j.w.r.degoede@hhs.nl> 0.5-1
|
||||||
|
- New upstream release 0.5 (rf1053)
|
||||||
|
- Fix some regressions introduced by upstream
|
||||||
|
- Add a bunch of home grown patches (I used to be part of upstream, but
|
||||||
|
upstream has moved to launchpad), fixing several bugs and cleaning up
|
||||||
|
the code left and right, all these are submitted upstream
|
||||||
|
|
||||||
|
* Sun Mar 29 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 0.4-4
|
||||||
|
- rebuild for new F11 features
|
||||||
|
|
||||||
|
* Thu Jul 24 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.4-3
|
||||||
|
- Rebuild for buildsys cflags issue
|
||||||
|
|
||||||
|
* Wed Jul 23 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.4-2
|
||||||
|
- Release bump for rpmfusion build
|
||||||
|
|
||||||
|
* Fri Dec 21 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.4-1
|
||||||
|
- New upstream release 0.4
|
||||||
|
- Drop all patches (all upstreamed)
|
||||||
|
|
||||||
|
* Tue Dec 11 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.3-6
|
||||||
|
- Add a patch with various fixes from CVS
|
||||||
|
- Add a patch fixing a small bug I introduced in mmsh
|
||||||
|
|
||||||
|
* Sat Dec 8 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.3-5
|
||||||
|
- Add a patch from debian adding mms seeking support
|
||||||
|
- Add various fixes to Debians seeking patch
|
||||||
|
- Add self written mmsh seeking patch
|
||||||
|
- Add patch exporting some asf header info
|
||||||
|
|
||||||
|
* Wed Sep 12 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.3-4
|
||||||
|
- Add a patch from Debian fixing another crash
|
||||||
|
- Merge freshrpms spec into livna spec for rpmfusion:
|
||||||
|
- Set release to 4 to be higher as both livna and freshrpms latest release
|
||||||
|
- Update License tag for new Licensing Guidelines compliance
|
||||||
|
- Add pkgconfig Requires to -devel package
|
||||||
|
- Include some more doc files
|
||||||
|
|
||||||
|
* Wed Mar 28 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.3-3
|
||||||
|
- Add a patch fixing a crash (livna-bz 1463)
|
||||||
|
|
||||||
|
* Fri Oct 06 2006 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> 0.3-2
|
||||||
|
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
|
||||||
|
|
||||||
|
* Tue Sep 26 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.3-1
|
||||||
|
- New upstream release 0.3
|
||||||
|
- This new release fixes CVS-2006-2200
|
||||||
|
|
||||||
|
* Sun Sep 24 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.2-2
|
||||||
|
- Rebuild for FC-6
|
||||||
|
|
||||||
|
* Sat Jul 29 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.2-1
|
||||||
|
- Minor specfile cleanups for livna submission.
|
||||||
|
|
||||||
|
* Mon Jun 12 2006 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
- 0.2-0.gst.2
|
||||||
|
- new release
|
||||||
|
|
||||||
|
* Wed Jan 05 2005 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
- 0.1-0.gst.1
|
||||||
|
- initial package
|
Loading…
Reference in new issue