Compile error with ffmpeg 3.0 in arch linux

Bug #1559797 reported by croxis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Fix Released
High
rdb

Bug Description

[T1] Building C++ object built/tmp/openal_audio_openal_audio_composite1.o
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:5:0:
panda/src/ffmpeg/ffmpegAudioCursor.cxx: In member function 'void FfmpegAudioCursor::cleanup()':
panda/src/ffmpeg/ffmpegAudioCursor.cxx:213:7: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
       av_free_packet(_packet);
       ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:5:0:
panda/src/ffmpeg/ffmpegAudioCursor.cxx:213:7: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
       av_free_packet(_packet);
       ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:5:0:
panda/src/ffmpeg/ffmpegAudioCursor.cxx:213:29: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
       av_free_packet(_packet);
                             ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:5:0:
panda/src/ffmpeg/ffmpegAudioCursor.cxx: In member function 'void FfmpegAudioCursor::fetch_packet()':
panda/src/ffmpeg/ffmpegAudioCursor.cxx:254:5: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
     av_free_packet(_packet);
     ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:5:0:
panda/src/ffmpeg/ffmpegAudioCursor.cxx:254:5: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
     av_free_packet(_packet);
     ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:5:0:
panda/src/ffmpeg/ffmpegAudioCursor.cxx:254:27: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
     av_free_packet(_packet);
                           ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:5:0:
panda/src/ffmpeg/ffmpegAudioCursor.cxx:262:5: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
     av_free_packet(_packet);
     ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:5:0:
panda/src/ffmpeg/ffmpegAudioCursor.cxx:262:5: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
     av_free_packet(_packet);
     ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:5:0:
panda/src/ffmpeg/ffmpegAudioCursor.cxx:262:27: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
     av_free_packet(_packet);
                           ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:5:0:
panda/src/ffmpeg/ffmpegAudioCursor.cxx: In member function 'bool FfmpegAudioCursor::reload_buffer()':
panda/src/ffmpeg/ffmpegAudioCursor.cxx:315:7: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
       av_free_packet(&pkt);
       ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:5:0:
panda/src/ffmpeg/ffmpegAudioCursor.cxx:315:7: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
       av_free_packet(&pkt);
       ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:5:0:
panda/src/ffmpeg/ffmpegAudioCursor.cxx:315:26: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
       av_free_packet(&pkt);
                          ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:6:0:
panda/src/ffmpeg/ffmpegVideoCursor.cxx: In member function 'void FfmpegVideoCursor::init_from(FfmpegVideo*)':
panda/src/ffmpeg/ffmpegVideoCursor.cxx:94:33: error: 'PIX_FMT_BGR24' was not declared in this scope
                                 PIX_FMT_BGR24, SWS_BILINEAR | SWS_PRINT_INFO, NULL, NULL, NULL);
                                 ^
panda/src/ffmpeg/ffmpegVideoCursor.cxx: In member function 'void FfmpegVideoCursor::cleanup()':
panda/src/ffmpeg/ffmpegVideoCursor.cxx:625:7: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
       av_free_packet(_packet);
       ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:6:0:
panda/src/ffmpeg/ffmpegVideoCursor.cxx:625:7: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
       av_free_packet(_packet);
       ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:6:0:
panda/src/ffmpeg/ffmpegVideoCursor.cxx:625:29: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
       av_free_packet(_packet);
                             ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:6:0:
panda/src/ffmpeg/ffmpegVideoCursor.cxx: In member function 'bool FfmpegVideoCursor::do_fetch_packet(int)':
panda/src/ffmpeg/ffmpegVideoCursor.cxx:815:5: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
     av_free_packet(_packet);
     ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:6:0:
panda/src/ffmpeg/ffmpegVideoCursor.cxx:815:5: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
     av_free_packet(_packet);
     ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:6:0:
panda/src/ffmpeg/ffmpegVideoCursor.cxx:815:27: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
     av_free_packet(_packet);
                           ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:6:0:
panda/src/ffmpeg/ffmpegVideoCursor.cxx:822:5: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
     av_free_packet(_packet);
     ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:6:0:
panda/src/ffmpeg/ffmpegVideoCursor.cxx:822:5: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
     av_free_packet(_packet);
     ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
In file included from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:6:0:
panda/src/ffmpeg/ffmpegVideoCursor.cxx:822:27: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
     av_free_packet(_packet);
                           ^
In file included from panda/src/ffmpeg/ffmpegAudioCursor.h:27:0,
                 from panda/src/ffmpeg/config_ffmpeg.cxx:20,
                 from panda/src/ffmpeg/p3ffmpeg_composite1.cxx:1:
/usr/include/libavcodec/avcodec.h:4040:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^
The following command returned a non-zero value: g++ -ftemplate-depth-70 -fPIC -c -o built/tmp/p3ffmpeg_composite1.o -Ibuilt/tmp -Ibuilt/include -I/usr/include/python2.7 -Ipanda/src/ffmpeg -pthread -fno-exceptions -msse2 -ffast-math -fno-finite-math-only -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -DBUILDING_FFMPEG panda/src/ffmpeg/p3ffmpeg_composite1.cxx
Storing dependency cache.
Elapsed Time: 3 min 32 sec
Build process aborting.

Revision history for this message
rdb (rdb) wrote :

I think it might be sufficient to replace PIX_FMT_BGR24 with AV_PIX_FMT_BGR24. I'll look into it.

Changed in panda3d:
milestone: none → 1.9.2
assignee: nobody → rdb (rdb)
importance: Undecided → High
status: New → Triaged
Revision history for this message
blackzafiro (blackzafiro-net) wrote :

You will also need to replace:

void av_free_packet(AVPacket *pkt);

with:

void av_packet_unref (AVPacket * pkt)
https://ffmpeg.org/doxygen/2.6/group__lavc__packet.html#ga63d5a489b419bd5d45cfd09091cbcbc2

rdb (rdb)
Changed in panda3d:
status: Triaged → Fix Committed
rdb (rdb)
Changed in panda3d:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.