[FFmpeg-devel] [PATCH] AAC decoder channel layout support

Jason Millard jsm174
Fri Oct 16 18:15:47 CEST 2009


>
> So the demuxer is borked? It's the demuxer's job to pass full frames
> to the decoder.
>
>
I think it may be. I finally had a chance to do more testing.

I removed my 0xfff bypass patch and curl'd some streams until I finally ran
into the situation.

This stream does not begin with a sync FFF and will not play.

FFplay version SVN-r20209-snapshot, Copyright (c) 2003-2009 Fabrice Bellard,
et al.
  built on Oct 16 2009 12:00:33 with gcc 4.0.1 (Apple Inc. build 5493)
  configuration:
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.36. 0 / 52.36. 0
  libavformat   52.39. 0 / 52.39. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1
[aac @ 0x1039e00]max_analyze_duration reached
Input #0, aac, from '/Users/jsm174/Desktop/streams/stream':
  Duration: 00:00:15.38, bitrate: 61 kb/s
    Stream #0.0: Audio: aac, 22050 Hz, 2 channels, s16, 61 kb/s
[aac @ 0x103ae00]aac_decode_frame() - enter - show_bits: 028B
[aac @ 0x103ae00]00000000  28 b2 bf e9 5d 7f f4 b5 cf ea de df e9 89 a1 df
(...]...........
[aac @ 0x103ae00]00000010  af fe d5 47 2f ef d7 94 c3 bd dd f3
...G/.......
[aac @ 0x103ae00]channel element 1.4 is not allocated
[aac @ 0x103ae00]aac_decode_frame() - enter - show_bits: 0FFF
[aac @ 0x103ae00]00000000  ff f0 32 c0 d0 04 80 60 3f ff f9 5c 80 2c c2 44
..2....`?..\.,.D
[aac @ 0x103ae00]00000010  21 1b 55 65 91 90 92 37 88 86 21 60 aa 80 02 08
!.Ue...7..!`....
[aac @ 0x103ae00]00000020  17 80 29 c9 29 f4 f5 a5 a5 56 2c d9 85 f2 d1 07
..).)....V,.....
[aac @ 0x103ae00]00000030  80 94 b6 8a e3 15 6e 05 82 ce 8d cd cf ec ae ab
......n.........
[aac @ 0x103ae00]00000040  1c 59 f0 fd dc bd 1b 2c 99 77 f3 69 e9 3d 02 8e
.Y.....,.w.i.=..
[aac @ 0x103ae00]00000050  ac 93 e7 9a e1 5d a7 c3 cb a4 d7 68 f1 1e f8 9c
.....].....h....
[aac @ 0x103ae00]00000060  a1 4b 2e a4 42 8c cb ed c7 b9 b6 ad f6 a9 d5 67
.K..B..........g
[aac @ 0x103ae00]00000070  f1 77 b5 94 61 34 b8 51 b6 c2 b0 96 1c 53 b6 ff
.w..a4.Q.....S..
[aac @ 0x103ae00]00000080  a2 73 ef 9e 1c fc d4 e8 bd af af c5 96 f3 b9 70
.s.............p
[aac @ 0x103ae00]00000090  ef f0 f2 75 fe a9 97 60 27 a9 af bf c3 3d be 9f
...u...`'....=..
[aac @ 0x103ae00]000000a0  ad 3e be 15 97 9b 8e 7c 9f dd ad 47 4c 25 2d e6
.>.....|...GL%-.
[aac @ 0x103ae00]000000b0  c3 5f 62 d3 c4 71 eb ce 58 e9 3e 28 11 94 f8 a9
._b..q..X.>(....
[aac @ 0x103ae00]000000c0  3d f5 38 80 c8 d9 6b f0 fc 0d 58 8d 3c 79 15 96
=.8...k...X.<y..
[aac @ 0x103ae00]000000d0  44 98 d9 62 15 32 ee 32 c1 4c 09 40 40 ba 00 30
D..b.2.2.L.@@..0
[aac @ 0x103ae00]000000e0  c4 3b a7 c9 bc 2c d1 ff a6 ed 5c db e0 5a 50 1e
.;...,....\..ZP.
[aac @ 0x103ae00]000000f0  0e 57 d4 1c e6 49 3e 43 f6 a1 41 a2 ae 82 a2 71
.W...I>C..A....q
[aac @ 0x103ae00]00000100  02 00 15 7c 7e bf fb 13 d4 e9 71 48 d3 cb b9 64
...|~.....qH...d
[aac @ 0x103ae00]00000110  fb ad 0e 3f 7c 56 e3 fd 20 81 06 30 4e 01 08 45
...?|V.. ..0N..E
[aac @ 0x103ae00]00000120  f2 ac 65 54 91 48 16 0a 7c 82 de f0 02 de 63 1d
..eT.H..|.....c.


(Above, notice the fff0 and a few bytes later, fff9)

I modified the stream and removed data to the first fff0. It still does not
play.

FFplay version SVN-r20209-snapshot, Copyright (c) 2003-2009 Fabrice Bellard,
et al.
  built on Oct 16 2009 12:00:33 with gcc 4.0.1 (Apple Inc. build 5493)
  configuration:
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.36. 0 / 52.36. 0
  libavformat   52.39. 0 / 52.39. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1
[aac @ 0x1039e00]max_analyze_duration reached
Input #0, aac, from '/Users/jsm174/Desktop/streams/stream_start_fff0_bad':
  Duration: 00:00:14.91, bitrate: 63 kb/s
    Stream #0.0: Audio: aac, 22050 Hz, 2 channels, s16, 63 kb/s
[aac @ 0x103ae00]aac_decode_frame() - enter - show_bits: 0FFF
[aac @ 0x103ae00]00000000  ff f0 32 c0 d0 04 80 60 3f ff f9 5c 80 2c c2 44
..2....`?..\.,.D
[aac @ 0x103ae00]00000010  21 1b 55 65 91 90 92 37 88 86 21 60 aa 80 02 08
!.Ue...7..!`....
[aac @ 0x103ae00]00000020  17 80 29 c9 29 f4 f5 a5 a5 56 2c d9 85 f2 d1 07
..).)....V,.....
.
.
.
[aac @ 0x103ae00]000000d0  03 00 70
..p
[aac @ 0x103ae00]channel element 1.8 is not allocated
[aac @ 0x103ae00]aac_decode_frame() - enter - show_bits: 0FFF


So I modified the stream one last time and remove all data to the fff9. That
version plays fine.

FFplay version SVN-r20209-snapshot, Copyright (c) 2003-2009 Fabrice Bellard,
et al.
  built on Oct 16 2009 12:00:33 with gcc 4.0.1 (Apple Inc. build 5493)
  configuration:
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.36. 0 / 52.36. 0
  libavformat   52.39. 0 / 52.39. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1
[aac @ 0x1039e00]max_analyze_duration reached
Input #0, aac, from '/Users/jsm174/Desktop/streams/stream_start_fff9_good':
  Duration: 00:00:15.37, bitrate: 61 kb/s
    Stream #0.0: Audio: aac, 22050 Hz, 2 channels, s16, 61 kb/s
[aac @ 0x103ae00]aac_decode_frame() - enter - show_bits: 0FFF
[aac @ 0x103ae00]00000000  ff f9 5c 80 2c c2 44 21 1b 55 65 91 90 92 37 88
..\.,.D!.Ue...7.
[aac @ 0x103ae00]00000010  86 21 60 aa 80 02 08 17 80 29 c9 29 f4 f5 a5 a5
.!`......).)....
[aac @ 0x103ae00]00000020  56 2c d9 85 f2 d1 07 80 94 b6 8a e3 15 6e 05 82
V,...........n..
[aac @ 0x103ae00]00000030  ce 8d cd cf ec ae ab 1c 59 f0 fd dc bd 1b 2c 99
........Y.....,.
[aac @ 0x103ae00]00000040  77 f3 69 e9 3d 02 8e ac 93 e7 9a e1 5d a7 c3 cb
w.i.=.......]...
[aac @ 0x103ae00]00000050  a4 d7 68 f1 1e f8 9c a1 4b 2e a4 42 8c cb ed c7
..h.....K..B....
[aac @ 0x103ae00]00000060  b9 b6 ad f6 a9 d5 67 f1 77 b5 94 61 34 b8 51 b6
......g.w..a4.Q.
[aac @ 0x103ae00]00000070  c2 b0 96 1c 53 b6 ff a2 73 ef 9e 1c fc d4 e8 bd
....S...s.......



Attached are the streams from above

-- Jason
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stream
Type: application/octet-stream
Size: 117903 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091016/3da6071a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stream_start_fff0_bad
Type: application/octet-stream
Size: 117875 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091016/3da6071a/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stream_start_fff9_good
Type: application/octet-stream
Size: 117866 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091016/3da6071a/attachment-0002.obj>



More information about the ffmpeg-devel mailing list