Page 2 of 2

Posted: Tue Feb 10, 2009 5:56 pm
by zoneminder
It should be relatviely easy to track down just by grepping for av_alloc_format_context and avformat_alloc_context in the ffmpeg build directories and/or install dirs.

Posted: Tue Feb 10, 2009 5:57 pm
by zoneminder
Having said of course it would not be the first time an update has gone into ffmpeg only to come out again the next day :?

Posted: Tue Feb 10, 2009 6:17 pm
by newvisionantenna
Or maybe the same day several hours later? I installed this morning, same error as everyone else except I went into the src folder and commented line 183 on the file the error showed.

Then this evening started from the beginning again and did everything the same and got no errors at all. Very strange, but I've captured all my work and it's uploading now.

Posted: Tue Feb 10, 2009 7:29 pm
by mgob
zoneminder wrote:
mgob wrote:Hrm, when I attempted my build last night it was against the latest and greatest FFMPEG but perhaps I had checked out a dud version. I'll try again today.

Edit:

Still no joy for me:

zm_rtsp.cpp:183: error: ‘avformat_alloc_context’ was not declared in this scope
zm_rtsp.cpp: In member function ‘virtual int RtspThread::run()’:


[root@dvr ZoneMinder]# ffmpeg
FFmpeg version SVN-r17132, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/usr --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-swscale --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug--disable-optimizations --disable-stripping
libavutil 49.14. 0 / 49.14. 0
libavcodec 52.14. 0 / 52.14. 0
libavformat 52.26. 0 / 52.26. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 3. 0 / 0. 3. 0
libswscale 0. 6. 1 / 0. 6. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Feb 10 2009 09:06:19, gcc: 4.1.2 20070925 (Red Hat 4.1.2-33)
At least one output file must be specified
Did you remember to 'make install-lib'?
Perhaps I'm a n00b but:

Code: Select all

[root@dvr ffmpeg]# make install-lib
make: *** No rule to make target `install-lib'.  Stop.

Posted: Tue Feb 10, 2009 7:42 pm
by newvisionantenna
It should be make install-libs. That should do it for you.

Posted: Tue Feb 10, 2009 7:52 pm
by zoneminder
Whichever one I try first, it's always the other one :lol:

Posted: Tue Feb 10, 2009 10:28 pm
by cordel
Well haven't they always changed that at some arbitrary phase of the solar system. :lol:
As I recall 6 years ago was "make installlib" a year and quarter later became "make installlibs" a year and 5 months afterward s "make install-lib", eight months after which became "make install-libs".
It's been about a couple years now so I think it's due to change again :lol:
:!: I think they just want to make sure your running "./configure --help" before each build to see what your options are :P

Posted: Sun Feb 15, 2009 7:26 pm
by timtim

Code: Select all

diff -urN ZoneMinder-1.24.0.old//src/zm_rtsp.cpp ZoneMinder-1.24.0//src/zm_rtsp.cpp
--- ZoneMinder-1.24.0.old//src/zm_rtsp.cpp      2009-02-09 14:43:19.000000000 +0000
+++ ZoneMinder-1.24.0//src/zm_rtsp.cpp  2009-02-15 19:15:23.629245785 +0000
@@ -180,7 +180,7 @@
         else
             mUrl += '/'+mPath;
     }
-    mFormatContext = avformat_alloc_context();
+    mFormatContext = av_alloc_format_context();

     mSsrc = rand();
Try this if you got the following error:
error: 'avformat_alloc_context' was not declared in this scope

Posted: Tue Feb 17, 2009 3:19 am
by kylejohnson
timtim wrote:

Code: Select all

diff -urN ZoneMinder-1.24.0.old//src/zm_rtsp.cpp ZoneMinder-1.24.0//src/zm_rtsp.cpp
--- ZoneMinder-1.24.0.old//src/zm_rtsp.cpp      2009-02-09 14:43:19.000000000 +0000
+++ ZoneMinder-1.24.0//src/zm_rtsp.cpp  2009-02-15 19:15:23.629245785 +0000
@@ -180,7 +180,7 @@
         else
             mUrl += '/'+mPath;
     }
-    mFormatContext = avformat_alloc_context();
+    mFormatContext = av_alloc_format_context();

     mSsrc = rand();
Try this if you got the following error:
error: 'avformat_alloc_context' was not declared in this scope
This worked for me.
make install-libs did not.
FFMPEG_VERSION "SVN-r17388"

Posted: Tue Mar 03, 2009 12:44 am
by kingofkya
just wanted to make aware this "bug" is still in 1.24.1 but the above worked

Posted: Tue Mar 03, 2009 10:08 pm
by zoneminder
I have just spent 45 minutes updating ffmpeg and ZM and I just don't get this error with ffmpeg SVN-r17785

The use of av_alloc_format_context is now deprecated and all instances should ve changed to avformat_alloc_context

Posted: Tue Mar 03, 2009 11:34 pm
by newvisionantenna
Same thing here, just built Zoneminder several times for testing purposes and I do not get that error iwth the newest ffmpeg.