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: buildSeverity: 3 - Normal
Release: 0.8.10Status: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

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

Ok, thanks

Sandro Santilli <strk>
Project MemberIn charge of this item.
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 MemberIn charge of this item.
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 MemberIn charge of this item.
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 MemberIn charge of this item.
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 MemberIn charge of this item.
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 MemberIn charge of this item.
Wed 13 Feb 2013 08:47:41 PM UTC, comment #3:

The patch broke builds on older systems:
http://www.gnashdev.org:8010/builders/maverick-linux-i386/builds/439/steps/compile/logs/stdio

I'll revert

Sandro Santilli <strk>
Project MemberIn charge of this item.
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 MemberIn charge of this item.
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 MemberIn charge of this item.
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 File(s):
   
   
Comment:
   

Attached Files
file #27459:  0001-Fix-build-with-latest-FFmpeg.-Add-ifdefery-to-be-com.patch added by aballier (9kB - text/x-patch - patch preserving compatibility with older versions)
file #27457:  0001-Fix-build-with-latest-FFmpeg.patch added by aballier (7kB - 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
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by aballier (Updated the item)
  • -unavailable- added by aballier
  • -unavailable- added by brad0 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 14 Feb 2013 04:03:04 PM UTCstrkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 14 Feb 2013 07:39:43 AM UTCstrkCategoryvideo-ffmpeg=>build
      StatusPostponed=>Ready For Test
    Wed 13 Feb 2013 10:46:48 PM UTCaballierAttached File-=>Added 0001-Fix-build-with-latest-FFmpeg.-Add-ifdefery-to-be-com.patch, #27459
    Wed 13 Feb 2013 08:53:47 PM UTCstrkStatusReady For Test=>Postponed
    Wed 13 Feb 2013 07:06:18 PM UTCstrkStatusNone=>Ready For Test
      Assigned toNone=>strk
    Wed 13 Feb 2013 06:07:26 PM UTCaballierAttached File-=>Added 0001-Fix-build-with-latest-FFmpeg.patch, #27457
    Wed 13 Feb 2013 05:27:10 PM UTCaballierCarbon-Copy-=>Added aballier

    Back to the top


    Powered by Savane 3.1-cleanup