bugGnash - The GNU Flash player - Bugs: bug #38122, failure to build with modern FFmpeg

 
 

bug #38122: failure to build with modern FFmpeg

Submitted by:  Brad Smith <brad0>
Submitted on:  Sun 20 Jan 2013 06:22:13 AM UTC
 
Category:  build Severity:  3 - Normal
Release:  0.8.10 Status:  Fixed
Privacy:  Public Assigned to:  strk
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

( Jump to the original submission )

Thu 14 Feb 2013 04:03:04 PM UTC, comment #12: 

Ok, thanks

Sandro Santilli <strk>
Project Member
Thu 14 Feb 2013 03:06:28 PM UTC, comment #11: 

These warnings are likely because commit 5c76984eea636cdf301b70012a77d8d8e7f6e611 uses the new API only with LIBAVCODEC_VERSION_MAJOR >= 53
these can be safely ignored IMHO (or the code changed to use the new API when the old one was deprecated)

btw, I have to check but its likely I'll need another patch to fix build against libav-9, I'll file a new bug for this

Alexis Ballier <aballier>
Thu 14 Feb 2013 08:30:48 AM UTC, comment #10: 

Maverick seems happy :)
Just a few warnings:
http://gnashdev.org:8010/builders/maverick-linux-i386/builds/442/steps/compile/logs/warnings%20%288%29

I think we theoretically supported back to version 51.10.0 but I'm not positive about it.

Sandro Santilli <strk>
Project Member
Thu 14 Feb 2013 07:39:43 AM UTC, comment #9: 

New patch pushed as commit:4b3dae970549d42723c2528c250a1f95248145c7

Let's see how maverick likes it

Sandro Santilli <strk>
Project Member
Wed 13 Feb 2013 09:42:00 PM UTC, comment #8: 

FYI: my build worked with your patch (LIBAVCODEC_VERSION_MAJOR 53) while the failing one was MAJOR 52 :

http://www.gnashdev.org:8010/builders/maverick-linux-i386/builds/439/steps/configure/logs/stdio

Sandro Santilli <strk>
Project Member
Wed 13 Feb 2013 09:25:11 PM UTC, comment #7: 

Ah, and about the warnings, yes I get a lot of them but I wanted to make the changes minimal.

Alexis Ballier <aballier>
Wed 13 Feb 2013 09:21:10 PM UTC, comment #6: 

ok, sorry I didn't know you were supporting such old versions, I'll resubmit a new patch with version checks.

BTW, you cannot #ifdef SAMPLE_FMT_S16 because it's in enum not a #define.

Alexis Ballier <aballier>
Wed 13 Feb 2013 09:02:43 PM UTC, comment #5: 

ffmpeg commit dropping deprecated symbol is here:

commit 5d6e4c160a4a0d71c17e8428123027c747ff0fb3
Author: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Date:   Fri Nov 12 11:04:40 2010 +0000

    Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
    SampleFormat with AVSampleFormat.

   

    Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk

Sandro Santilli <strk>
Project Member
Wed 13 Feb 2013 08:53:47 PM UTC, comment #4: 

So commit 28385885677c95e0bec54adad4c94190180b2b3d reverts the change. Feel free to re-submit a patch that would work with both old and new Ffmpeg versions.

For the macros, consider adding blocks like:

#ifdef SAMPLE_FMT_S16
# define AV_SAMPLE_FMT_S16 SAMPLE_FMT_S16
#endif

In the libmedia/ffmpegHeaders.h file.
Similar compile-time switches are probably good to add in there

Sandro Santilli <strk>
Project Member
Wed 13 Feb 2013 08:47:41 PM UTC, comment #3: 
Sandro Santilli <strk>
Project Member
Wed 13 Feb 2013 07:06:18 PM UTC, comment #2: 

Pushed 63cb1b7678b9fbe7dcbd67004122be6a920735bf after testing it with the version I reported of ffmpeg.

By the way, I have these warnings that may or may not be important (don't you have them with newer ffmpeg?):

/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::AudioDecoderFfmpeg::setup(gnash::media::SoundInfo&)':
/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp:132:22: warning: 'AVCodecContext* avcodec_alloc_context()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3905) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp:132:44: warning: 'AVCodecContext* avcodec_alloc_context()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3905) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp:137:15: warning: 'int avcodec_open(AVCodecContext*, AVCodec*)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4035) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp:137:55: warning: 'int avcodec_open(AVCodecContext*, AVCodec*)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4035) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::AudioDecoderFfmpeg::setup(const gnash::media::AudioInfo&)':
/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp:254:22: warning: 'AVCodecContext* avcodec_alloc_context()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3905) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp:254:44: warning: 'AVCodecContext* avcodec_alloc_context()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3905) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp:305:15: warning: 'int avcodec_open(AVCodecContext*, AVCodec*)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4035) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp:305:55: warning: 'int avcodec_open(AVCodecContext*, AVCodec*)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4035) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp: In member function 'uint8_t* gnash::media::ffmpeg::AudioDecoderFfmpeg::decodeFrame(const uint8_t*, uint32_t, uint32_t&)':
/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp:508:27: warning: cast from type 'const uint8_t* {aka const unsigned char*}' to type 'uint8_t* {aka unsigned char*}' casts away qualifiers [-Wcast-qual]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp:511:15: warning: 'int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4131) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp:513:40: warning: 'int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4131) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::VideoDecoderFfmpeg::init(CodecID, int, int, uint8_t*, int)':
/usr/src/gnash/gnash-head/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp:182:50: warning: 'AVCodecContext* avcodec_alloc_context()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3905) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp:182:72: warning: 'AVCodecContext* avcodec_alloc_context()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3905) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp:205:15: warning: 'int avcodec_open(AVCodecContext*, AVCodec*)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4035) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp:205:44: warning: 'int avcodec_open(AVCodecContext*, AVCodec*)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4035) [-Wdeprecated-declarations]
/usr/src/gnash/gnash-head/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp: In member function 'std::auto_ptr<gnash::image::GnashImage> gnash::media::ffmpeg::VideoDecoderFfmpeg::decode(const uint8_t*, uint32_t)':
/usr/src/gnash/gnash-head/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp:362:27: warning: cast from type 'const uint8_t* {aka const unsigned char*}' to type 'uint8_t* {aka unsigned char*}' casts away qualifiers [-Wcast-qual]

Sandro Santilli <strk>
Project Member
Wed 13 Feb 2013 06:39:25 PM UTC, comment #1: 

The patch looks like not checking FFMPEG version at all.
I don't think we want to drop support for older versions.
Note that so far we're supporting also 0.svn20080206-18+lenny3

Sandro Santilli <strk>
Project Member
Sun 20 Jan 2013 06:22:13 AM UTC, original submission:  

Gnash 0.8.10 fails to build with modern (0.11+) FFmpeg releases.

Brad Smith <brad0>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #27459:  0001-Fix-build-with-latest-FFmpeg.-Add-ifdefery-to-be-com.patch added by aballier (9KiB - text/x-patch - patch preserving compatibility with older versions)
file #27457:  0001-Fix-build-with-latest-FFmpeg.patch added by aballier (7KiB - text/x-patch - Simplest patch I could write to let it build and work against recent FFmpeg versions.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by aballier (Updated the item)
  • -email is unavailable- added by aballier
  • -email is unavailable- added by brad0 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-02-14 strk StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2013-02-14 strk Categoryvideo-ffmpeg => build
        StatusPostponed => Ready For Test
    2013-02-13 aballier Attached File- => Added 0001-Fix-build-with-latest-FFmpeg.-Add-ifdefery-to-be-com.patch, #27459
    2013-02-13 strk StatusReady For Test => Postponed
    2013-02-13 strk StatusNone => Ready For Test
        Assigned toNone => strk
    2013-02-13 aballier Attached File- => Added 0001-Fix-build-with-latest-FFmpeg.patch, #27457
    2013-02-13 aballier Carbon-Copy- => Added aballier

    Back to the top


    Powered by Savane 3.9