[Bug 645607] New: a problem of compiling 'ext/ffmpeg/gstffmpegcodecmap.c'

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Mar 23 13:05:50 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=645607
  GStreamer | gst-ffmpeg | 0.10.11

           Summary: a problem of compiling
                    'ext/ffmpeg/gstffmpegcodecmap.c'
    Classification: Desktop
           Product: GStreamer
           Version: 0.10.11
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-ffmpeg
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: brofkims at gmail.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
      GNOME target: ---
     GNOME version: ---


1. On 64-bit Ubuntu natty(10.04 beta) gcc-4.5.2-6ubuntu5 fails to compile
'ext/ffmpeg/gstffmpegcodecmap.c' in gst-ffmpeg-0.10.11.1+gst20110318 due to a
switch statement beinning at line 435.
BTW, gcc-4.4 compiles it well.
Error messages are following at the end of this report.


2. The switch statement is as follows:

    /* regardless of encode/decode, open up channels if applicable */
    /* Until decoders/encoders expose the maximum number of channels
     * they support, we whitelist them here. */
    switch (codec_id) {
      case CODEC_ID_AC3:
      case CODEC_ID_EAC3:
      case CODEC_ID_AAC:
      case CODEC_ID_DTS:
        maxchannels = 6;
        break;
      case CODEC_ID_WMAPRO:
      case CODEC_ID_TRUEHD:
        maxchannels = 8;
        break;
      default:
        break;
    }


3. This code is compiled with gcc-4.4, but is not compiled with
gcc-4.5.2-6ubuntu5 due to internal compiler error.
It seems that this error begin to appear after I updated to gcc-4.5.2-6ubuntu5.

Anyhow, if I add 'maxchannels = 6' or 'maxchannels = 8' right below 'default:',
both gcc-4.4 and gcc-4.5.2-6ubuntu5 comples the whole code without error.

A patch is as follows:

--- a/ext/ffmpeg/gstffmpegcodecmap.c.orig       2011-03-24 02:29:40.000000000
+0900
+++ b/ext/ffmpeg/gstffmpegcodecmap.c    2011-03-24 02:08:12.000000000 +0900
@@ -444,6 +444,7 @@
         maxchannels = 8;
         break;
       default:
+       maxchannels = 6;
         break;
     }


4.  I'm not convinced whether this is correct or not, but I am suspicious about
the switch statement after reading a reference page, ie.,
http://winavr.scienceprog.com/short-introduction-to-c/program-flow-in-embedded-c.html
.


5. Error messages are as follows:

...
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -pthread
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-I/usr/include/gstreamer-0.10 -I/usr/include/libxml2 -I../../gst-libs
-I../../gst-libs -pthread -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gstreamer-0.10
-I/usr/include/libxml2 -Wall -Wdeclaration-after-statement -Wvla
-Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls
-Wundef -Wwrite-strings -Wformat-nonliteral -Wformat-security
-Wold-style-definition -Wcast-align -Winit-self -Wmissing-include-dirs
-Waddress -Waggregate-return -Wno-multichar -Wnested-externs -Werror
-DGST_DISABLE_DEPRECATED -g -O2 -g -O2 -Wno-error -c gstffmpegcodecmap.c  -fPIC
-DPIC -o .libs/libgstffmpeg_la-gstffmpegcodecmap.o
gstffmpegcodecmap.c: In function ‘gst_ffmpeg_get_palette’:
gstffmpegcodecmap.c:53:7: warning: ‘AVPaletteControl’ is deprecated (declared
at /usr/include/libavcodec/avcodec.h:2984)
gstffmpegcodecmap.c: In function ‘gst_ff_aud_caps_new’:
gstffmpegcodecmap.c:435:5: internal compiler error: in set_jump_prob, at
stmt.c:2319
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
make[4]: *** [libgstffmpeg_la-gstffmpegcodecmap.lo] error 1
make[4]: Leaving directory
`/home/brofkims/build/gstreamer0.10-ffmpeg-0.10.11.1+git20110318/ext/ffmpeg'
make[3]: *** [all-recursive] error 1
make[3]: Leaving directory
`/home/brofkims/build/gstreamer0.10-ffmpeg-0.10.11.1+git20110318/ext'
make[2]: *** [all-recursive] error 1
make[2]: Leaving directory
`/home/brofkims/build/gstreamer0.10-ffmpeg-0.10.11.1+git20110318'
make[1]: *** [all] error 2
make[1]: Leaving directory
`/home/brofkims/build/gstreamer0.10-ffmpeg-0.10.11.1+git20110318'
make: *** [debian/stamp-makefile-build] error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list