I couldn't install music-player-core with pip on python 2.7.10 and when i tried to compile the package i got the following errors.
musicplayer_player_decoding.cpp:807:23: error: use of undeclared identifier 'avcodec_alloc_frame'musicplayer_player_decoding.cpp:810:5: error: use of undeclared identifier 'avcodec_get_frame_defaults'
I then replaced avcodec_alloc_frame() with av_frame_alloc() and removed avcodec_get_frame_defaults(is->frame) because avcodec_decode_audio4() apparently will reset the frame itself. After that i could compile the project and also install it with pip. I tested the musicplayer with the example code and it worked.
I'm not at all confident with c++ and therefor not sure if my fix breaks more than it will fix.
I work on a Mac 10.11.6 with Apple LLVM version 8.0.0.
@albertz @bryanjos @fredericgermain @christophmluscher could one of you merge this? I can confirm that it fixes the installation error on Ubuntu 18.04 LTS.
I couldn't install music-player-core with pip on python 2.7.10 and when i tried to compile the package i got the following errors.
musicplayer_player_decoding.cpp:807:23: error: use of undeclared identifier 'avcodec_alloc_frame'
musicplayer_player_decoding.cpp:810:5: error: use of undeclared identifier 'avcodec_get_frame_defaults'
I then replaced
avcodec_alloc_frame()
withav_frame_alloc()
and removedavcodec_get_frame_defaults(is->frame)
becauseavcodec_decode_audio4()
apparently will reset the frame itself. After that i could compile the project and also install it with pip. I tested the musicplayer with the example code and it worked.I'm not at all confident with c++ and therefor not sure if my fix breaks more than it will fix.
I work on a Mac 10.11.6 with Apple LLVM version 8.0.0.