Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 478080 - media-sound/sox-14.4.1 with media-video/ffmpeg-2.0 - ffmpeg.c:166:49: error: 'AVCODEC_MAX_AUDIO_FRAME_SIZE' undeclared (first use in this function)
Summary: media-sound/sox-14.4.1 with media-video/ffmpeg-2.0 - ffmpeg.c:166:49: error: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: ffmpeg-2.0
  Show dependency tree
 
Reported: 2013-07-25 06:32 UTC by PM
Modified: 2013-08-06 21:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description PM 2013-07-25 06:32:18 UTC
ffmpeg.c: In function 'audio_decode_frame':
ffmpeg.c:140:7: warning: 'avcodec_decode_audio3' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3664) [-Wdeprecated-declarations]
       len1 = avcodec_decode_audio3(ffmpeg->audio_st->codec,
       ^
In file included from util.h:32:0,
                 from sox_i.h:27,
                 from ffmpeg.c:43:
ffmpeg.c: In function 'startread':
ffmpeg.c:166:49: error: 'AVCODEC_MAX_AUDIO_FRAME_SIZE' undeclared (first use in this function)
   ffmpeg->audio_buf_raw = lsx_calloc(1, (size_t)AVCODEC_MAX_AUDIO_FRAME_SIZE + 32);
                                                 ^
xmalloc.h:27:32: note: in definition of macro 'lsx_calloc'
 #define lsx_calloc(n,s) (((n)*(s))? memset(lsx_malloc((n)*(s)),0,(n)*(s)) : NULL)
                                ^
ffmpeg.c:166:49: note: each undeclared identifier is reported only once for each function it appears in
   ffmpeg->audio_buf_raw = lsx_calloc(1, (size_t)AVCODEC_MAX_AUDIO_FRAME_SIZE + 32);
                                                 ^
xmalloc.h:27:32: note: in definition of macro 'lsx_calloc'
 #define lsx_calloc(n,s) (((n)*(s))? memset(lsx_malloc((n)*(s)),0,(n)*(s)) : NULL)
                                ^
ffmpeg.c: In function 'read_samples':
ffmpeg.c:238:86: error: 'AVCODEC_MAX_AUDIO_FRAME_SIZE' undeclared (first use in this function)
       ffmpeg->audio_buf_size = audio_decode_frame(ffmpeg, ffmpeg->audio_buf_aligned, AVCODEC_MAX_AUDIO_FRAME_SIZE);
                                                                                      ^
ffmpeg.c: In function 'stopread':
ffmpeg.c:261:5: warning: 'av_close_input_file' is deprecated (declared at /usr/include/libavformat/avformat.h:1735) [-Wdeprecated-declarations]
     av_close_input_file(ffmpeg->ctxt);
     ^
ffmpeg.c: At top level:
ffmpeg.c:272:80: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
 static AVStream *add_audio_stream(sox_format_t * ft, AVFormatContext *oc, enum CodecID codec_id)
                                                                                ^
ffmpeg.c:272:80: warning: 'enum CodecID' declared inside parameter list [enabled by default]
ffmpeg.c:272:80: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
ffmpeg.c:272:88: error: parameter 3 ('codec_id') has incomplete type
 static AVStream *add_audio_stream(sox_format_t * ft, AVFormatContext *oc, enum CodecID codec_id)
                                                                                        ^
ffmpeg.c:272:18: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 static AVStream *add_audio_stream(sox_format_t * ft, AVFormatContext *oc, enum CodecID codec_id)
                  ^
ffmpeg.c: In function 'add_audio_stream':
ffmpeg.c:272:88: warning: unused parameter 'codec_id' [-Wunused-parameter]
 static AVStream *add_audio_stream(sox_format_t * ft, AVFormatContext *oc, enum CodecID codec_id)
                                                                                        ^
In file included from util.h:32:0,
                 from sox_i.h:27,
                 from ffmpeg.c:43:
ffmpeg.c: In function 'open_audio':
ffmpeg.c:316:46: error: 'AVCODEC_MAX_AUDIO_FRAME_SIZE' undeclared (first use in this function)
   ffmpeg->audio_buf_raw = lsx_malloc((size_t)AVCODEC_MAX_AUDIO_FRAME_SIZE + 32);
                                              ^
xmalloc.h:26:45: note: in definition of macro 'lsx_malloc'
 #define lsx_malloc(size) lsx_realloc(NULL, (size))
                                             ^
ffmpeg.c: In function 'write_samples':
ffmpeg.c:426:7: warning: 'avcodec_encode_audio' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4056) [-Wdeprecated-declarations]
       pkt.size = avcodec_encode_audio(c, ffmpeg->audio_buf_aligned, AVCODEC_MAX_AUDIO_FRAME_SIZE, ffmpeg->samples);
       ^
ffmpeg.c:426:69: error: 'AVCODEC_MAX_AUDIO_FRAME_SIZE' undeclared (first use in this function)
       pkt.size = avcodec_encode_audio(c, ffmpeg->audio_buf_aligned, AVCODEC_MAX_AUDIO_FRAME_SIZE, ffmpeg->samples);
                                                                     ^
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
flac.c:1:0: note: this is the location of the previous definition
 /* libSoX file format: FLAC   (c) 2006-7 robs@users.sourceforge.net
 ^
make[1]: *** [libsox_la-ffmpeg.lo] Błąd 1
make[1]: *** Oczekiwanie na niezakończone zadania....
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
gsm.c:1:0: note: this is the location of the previous definition
 /* Copyright 1991, 1992, 1993 Guido van Rossum And Sundry Contributors.
 ^
make[1]: Opuszczenie katalogu `/var/tmp/portage/media-sound/sox-14.4.1/work/sox-14.4.1/src'
make: *** [all-recursive] Błąd 1


Reproducible: Always
Comment 1 gerion 2013-07-25 15:20:05 UTC
Won't be fixed by upstream. FFMpeg will be removed in next release.

You can find it in several E-Mails or here: http://sourceforge.net/p/sox/code/ci/master/tree/ChangeLog

Here is the corresponding commit: http://sourceforge.net/p/sox/code/ci/4568ed79319230843cf353faf79f973eb91b6e48
Comment 2 Alexis Ballier gentoo-dev 2013-08-06 21:41:06 UTC
+  06 Aug 2013; Alexis Ballier <aballier@gentoo.org> sox-14.4.1.ebuild,
+  +files/sox-14.4.1-ffmpeg2.patch:
+  fix build with ffmpeg-2, bug #478080
+


was easy enough so i fixed it