This forum has been archived. All content is frozen. Please use KDE Discuss instead.

FreeBSD7 and MP4Close(handle)

Tags: None
(comma "," separated)
imported-mefisto
Registered Member
Posts
3
Karma
0

FreeBSD7 and MP4Close(handle)

Thu Oct 04, 2007 11:06 am
I was building Amarok 1.4.7 form ports (if someone dont know what it is) in FreeBSB7-current.
But it anded in error: mp4file.cpp:158: error: could not convert 'MP4Close(handle)' to 'bool'

Full message : http://rafb.net/p/68zy6334.html
Martin Aumueller
KDE Developer
Posts
219
Karma
0

Re: FreeBSD7 and MP4Close(handle)

Thu Oct 04, 2007 11:40 am
What version of mpeg4ip/libmp4v2 do you have installed?

I just checked my /usr/include/mp4.h header from media-libs/libmp4v2-1.5.0.1, and there MP4Close explicitly returns bool.
imported-mefisto
Registered Member
Posts
3
Karma
0

Re: FreeBSD7 and MP4Close(handle)

Thu Oct 04, 2007 11:44 am
I have mpeg4ip-libmp4v2-1.6 installed here
All header files are in /usr/local/include.
Martin Aumueller
KDE Developer
Posts
219
Karma
0

Re: FreeBSD7 and MP4Close(handle)

Thu Oct 04, 2007 12:08 pm
I think this patch should fix it: in 1.6.1, MP4Close has void return type.

Index: mp4file.cpp
===================================================================
--- mp4file.cpp (revision 721027)
+++ mp4file.cpp (revision 721029)
@@ -156,10 +156,7 @@
    }
#endif

-    if(!MP4Close(handle))
-    {
-        fprintf(stderr, "close failed\n");
-    }
+    MP4Close(handle);

    mp4file = MP4Read(name());
    if(mp4file == MP4_INVALID_FILE_HANDLE)
imported-mefisto
Registered Member
Posts
3
Karma
0

Re: FreeBSD7 and MP4Close(handle)

Thu Oct 04, 2007 3:17 pm
Shouldnt it be in 'try' block ?
Martin Aumueller
KDE Developer
Posts
219
Karma
0

Re: FreeBSD7 and MP4Close(handle)

Fri Oct 05, 2007 1:10 pm
I don't understand what you mean by 'try block'. If you are referring to exception handling: libmp4v2 is a C (not C++) library and thus cannot throw exceptions.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]