[FFmpeg-trac] #263(avformat:open): Unimplemented container channel layout

FFmpeg trac at avcodec.org
Tue Jun 7 05:53:28 CEST 2011


#263: Unimplemented container channel layout
-----------------------+-----------------------
Reporter:  rectalogic  |       Owner:  cehoyos
    Type:  defect      |      Status:  open
Priority:  normal      |   Component:  avformat
 Version:  git-master  |  Resolution:
Keywords:              |  Blocked By:
Blocking:              |  Reproduced:  0
Analyzed:  0           |
-----------------------+-----------------------

Comment (by rectalogic):

 Replying to [comment:1 cehoyos]:
 > Since I cannot reproduce a crash with mplayer, and ffplay plays your
 sample fine for me, could you either provide a backtrace for the MPlayer
 crash or more information for the problem with ffplay? Does converting the
 file with ffmpeg -i qdm2-channels.mov out.avi produce a working file for
 you?

 Converting with ffmpeg still prints the warning, but does result in a
 working file (audio and video).

 mplayer compiled 64bit does not crash. 32bit mplayer crashes with this
 backtrace:
 {{{
 libavformat file format detected.
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x8f11500] Unimplemented container channel
 layout.
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x8f11500] If you want to help, upload a sample
 of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the
 ffmpeg-devel mailing list.
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x8f11500] max_analyze_duration 5000000 reached
 at 5120000
 [lavf] stream 0: audio (qdm2), -aid 0, -alang eng
 [lavf] stream 1: video (svq1), -vid 0
 VIDEO:  [SVQ1]  320x240  24bpp  14.985 fps  285.6 kbps (34.9 kbyte/s)
 Clip info:
  major_brand: qt
  minor_version: 537199360
  compatible_brands: qt
  creation_time: 2006-11-03 19:12:00
  composer: This movie was made with Adobe GoLive.
  composer-eng: This movie was made with Adobe GoLive.
 Load subtitles in /storage/dataset/
 [gl] no GLX support present
 ==========================================================================
 Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
 Selected video codec: [ffsvq1] vfm: ffmpeg (FFmpeg Sorenson Video v1
 (SVQ1))
 ==========================================================================
 ==========================================================================
 Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders

 Program received signal SIGSEGV, Segmentation fault.
 0x085d1140 in apply_window_mp3 (in=0x8f94900, win=0x8e73a20,
     unused=0xffffb25c, out=0xffff8e5c, incr=1) at
 x86/mpegaudiodec_mmx.c:120
 120             __asm__ volatile(
 (gdb) bt
 #0  0x085d1140 in apply_window_mp3 (in=0x8f94900, win=0x8e73a20,
     unused=0xffffb25c, out=0xffff8e5c, incr=1) at
 x86/mpegaudiodec_mmx.c:120
 #1  0x08481085 in ff_mpa_synth_filter_float (s=0x8f948e8,
     synth_buf_ptr=0x8f94900, synth_buf_offset=0x8f96900, window=0x8e73a20,
     dither_state=0xffffb25c, samples=0xffff8e5c, incr=1,
 sb_samples=0x8f96920)
     at mpegaudiodsp_template.c:173
 #2  0x084c43de in qdm2_synthesis_filter (q=<value optimized out>,
     index=<value optimized out>) at qdm2.c:1616
 #3  0x084c6f84 in qdm2_decode (avctx=0x8f37cc0, data=0xf6bd5020,
     data_size=0xffffb468, avpkt=0xffffb414) at qdm2.c:1927
 #4  qdm2_decode_frame (avctx=0x8f37cc0, data=0xf6bd5020,
 data_size=0xffffb468,
     avpkt=0xffffb414) at qdm2.c:1966
 #5  0x08522740 in avcodec_decode_audio3 (avctx=0x8f37cc0,
 samples=0xf6bd5020,
     frame_size_ptr=0xffff8e5c, avpkt=0xffffb414) at utils.c:796
 #6  0x081efc38 in decode_audio (sh_audio=DWARF-2 expression error:
 DW_OP_reg operations must be used either alone or in conjuction with
 DW_OP_piece.
 ) at libmpcodecs/ad_ffmpeg.c:229
 #7  0x081f00cf in init (sh_audio=0x8f182e0) at libmpcodecs/ad_ffmpeg.c:159
 #8  0x0814424d in init_audio_codec (sh_audio=0x8f182e0,
     codecname=<value optimized out>, afm=<value optimized out>, status=1,
     selected=0xffffb59c) at libmpcodecs/dec_audio.c:107
 #9  init_audio (sh_audio=0x8f182e0, codecname=<value optimized out>,
     afm=<value optimized out>, status=1, selected=0xffffb59c)
     at libmpcodecs/dec_audio.c:229
 #10 0x0814463d in init_best_audio_codec (sh_audio=0x8f182e0,
 ---Type <return> to continue, or q <return> to quit---
     audio_codec_list=0xffffb594, audio_fm_list=0x0)
     at libmpcodecs/dec_audio.c:282
 #11 0x080cbd1d in reinit_audio_chain () at mplayer.c:1713
 #12 0x080ce86e in main (argc=2, argv=0xffffd794) at mplayer.c:3688
 }}}

 I also ran "ffmpeg -i qdm2-channels.mov " under gdb and set a breakpoint
 in ff_mov_read_chan() which is where the warning is being printed - it is
 warning because size is 32 and it expects it to be 12. If you set a
 breakpoint here do you see the same thing? Analyzing the file itself, the
 'chan' tag is 32 bytes so I would expect the warning.
 {{{
 #0  ff_mov_read_chan (s=0x130d3e0, size=32, codec=0x1310120)
     at libavformat/isom.c:462
 462         if (size != 12) {
 (gdb) p size
 $6 = 32
 (gdb) bt
 #0  ff_mov_read_chan (s=0x130d3e0, size=32, codec=0x1310120)
     at libavformat/isom.c:462
 #1  0x0000000000490e5b in mov_read_chan (c=0x130da00,
     pb=<value optimized out>, atom=...) at libavformat/mov.c:2213
 #2  0x0000000000490c16 in mov_read_default (c=0x130da00, pb=0x1315a60,
     atom=...) at libavformat/mov.c:308
 #3  0x0000000000496030 in ff_mov_read_stsd_entries (c=<value optimized
 out>,
     pb=0x1315a60, entries=<value optimized out>) at libavformat/mov.c:1190
 #4  0x0000000000490c16 in mov_read_default (c=0x130da00, pb=0x1315a60,
     atom=...) at libavformat/mov.c:308
 #5  0x0000000000490c16 in mov_read_default (c=0x130da00, pb=0x1315a60,
     atom=...) at libavformat/mov.c:308
 #6  0x0000000000490c16 in mov_read_default (c=0x130da00, pb=0x1315a60,
     atom=...) at libavformat/mov.c:308
 #7  0x0000000000490c16 in mov_read_default (c=0x130da00, pb=0x1315a60,
     atom=...) at libavformat/mov.c:308
 #8  0x00000000004942a7 in mov_read_trak (c=0x130da00, pb=0x1315a60,
 atom=...)
     at libavformat/mov.c:1752
 #9  0x0000000000490c16 in mov_read_default (c=0x130da00, pb=0x1315a60,
     atom=...) at libavformat/mov.c:308
 #10 0x0000000000490cd5 in mov_read_moov (c=0x130d3e0, pb=0x20, atom=...)
     at libavformat/mov.c:585
 #11 0x0000000000490c16 in mov_read_default (c=0x130da00, pb=0x1315a60,
 ---Type <return> to continue, or q <return> to quit---
     atom=...) at libavformat/mov.c:308
 #12 0x0000000000494f00 in mov_read_header (s=<value optimized out>,
     ap=<value optimized out>) at libavformat/mov.c:2397
 #13 0x00000000004e3d33 in av_demuxer_open (ic=0x130d3e0, ap=0x20)
     at libavformat/utils.c:481
 #14 0x000000000043548f in opt_input_file (opt=<value optimized out>,
     filename=0x7fffffffe3ce
 "/storage/dataset/MPEG-4++SVQ1-320x240++Qdesign_2--
 hreftrack-1200912-87d04a01f0c90814.mov") at ffmpeg.c:3289
 #15 0x0000000000440121 in parse_options (argc=3, argv=0x7fffffffe148,
     options=<value optimized out>,
     parse_arg_function=0x43cd30 <opt_output_file>) at cmdutils.c:279
 #16 0x000000000043ba9e in main (argc=3, argv=0x7fffffffe148) at
 ffmpeg.c:4524
 (gdb) up
 #1  0x0000000000490e5b in mov_read_chan (c=0x130da00,
     pb=<value optimized out>, atom=...) at libavformat/mov.c:2213
 2213        ff_mov_read_chan(c->fc, atom.size - 4,
 c->fc->streams[0]->codec);
 (gdb) p atom
 $7 = {type = 1851877475, size = 36}
 }}}


 If you look at the channel layout tag field in the 'chan' atom in the
 sample, it's 0x640001. This is (100<<16)|1 which is
 kCAFChannelLayoutTag_Mono (I think Apples
 [http://developer.apple.com/library/mac/#documentation/MusicAudio/Reference/CAFSpec/CAF_spec/CAF_spec.html#//apple_ref/doc/uid/TP40001862-CH210-DontLinkElementID_64
 CAF docs]  define the channel layout flags)

 So I think this 'chan' atom seems valid even though it is larger than
 ffmpeg expects - looking at the docs it seems like any size should be
 allowed - 'chan' atoms are variable sized and the only restriction is the
 size must be valid.

 I'll attach a patch. Unfortunately, 32 bit mplayer still crashes even with
 the patch - that must be a different issue.

-- 
Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/263#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list