New submission from Aurelien Jacobs <[EMAIL PROTECTED]>:

The following file contains h264 video and AAC audio:
  http://moviebox.free.fr/geexbox/bug/freetv.ts
VLC plays it perfectly.
MPlayer demuxer the AAC stream but don't decode it.
ffmpeg only demux the h264 video.
With the attached patch ffmpeg also demux the AAC stream,
but AAC decoding then don't work:

Input #0, mpegts, from '/home/aurel/data/samples/freetv.ts':
  Duration: 00:00:25.7, start: 26894.293311, bitrate: 345 kb/s
  Program 1 
    Stream #0.0[0x44](fra): Audio: mpeg4aac, 7350 Hz, 5:1, 102 kb/s
    Stream #0.1[0x45]: Video: h264, yuv420p, 320x240 [PAR 224:225 DAR 896:675],
25.00 fps(r)
[mpeg4aac @ 0x84bda90]faac: codec init failed: (null)
[mpeg4aac @ 0x84bda90]faac: frame decoding failed: Invalid number of channels
[mpeg4aac @ 0x84bda90]faac: frame decoding failed: Bitstream value not allowed
by specification
[mpeg4aac @ 0x84bda90]faac: frame decoding failed: Bitstream value not allowed
by specification
[mpeg4aac @ 0x84bda90]faac: frame decoding failed: Invalid number of channels
[mpeg4aac @ 0x84bda90]faac: frame decoding failed: Invalid number of channels
[mpeg4aac @ 0x84bda90]faac: frame decoding failed: Bitstream value not allowed
by specification
[mpeg4aac @ 0x84bda90]faac: frame decoding failed: Invalid number of channels
[mpeg4aac @ 0x84bda90]faac: frame decoding failed: Bitstream value not allowed
by specification
[mpeg4aac @ 0x84bda90]faac: frame decoding failed: Array index out of range
[mpeg4aac @ 0x84bda90]faac: frame decoding failed: Unexpected fill element with
SBR data
[mpeg4aac @ 0x84bda90]faac: frame decoding failed: PCE shall be the first
element in a frame
[mpeg4aac @ 0x84bda90]faac: frame decoding failed: Bitstream value not allowed
by specification
[mpeg4aac @ 0x84bda90]faac: frame decoding failed: Bitstream value not allowed
by specification

----------
files: mpegts_aac.diff
messages: 984
nosy: aurel
priority: normal
status: new
substatus: new
title: AAC in MPEG-TS not working
type: bug

______________________________________________________
FFmpeg issue tracker <[EMAIL PROTECTED]>
<https://roundup.mplayerhq.hu/roundup/ffmpeg/issue244>
______________________________________________________
Index: libavformat/mpegts.c
===================================================================
--- libavformat/mpegts.c	(revision 10910)
+++ libavformat/mpegts.c	(working copy)
@@ -585,6 +585,7 @@
         case STREAM_TYPE_VIDEO_H264:
         case STREAM_TYPE_VIDEO_VC1:
         case STREAM_TYPE_AUDIO_AAC:
+        case STREAM_TYPE_AUDIO_AAC2:
         case STREAM_TYPE_AUDIO_AC3:
         case STREAM_TYPE_AUDIO_DTS:
         case STREAM_TYPE_SUBTITLE_DVB:
@@ -801,7 +802,8 @@
                     code = pes->header[3] | 0x100;
                     if (!((code >= 0x1c0 && code <= 0x1df) ||
                           (code >= 0x1e0 && code <= 0x1ef) ||
-                          (code == 0x1bd) || (code == 0x1fd)))
+                          (code == 0x1bd) || (code == 0x1fa) ||
+                          (code == 0x1fd)))
                         goto skip;
                     if (!pes->st) {
                         /* allocate stream */
@@ -914,6 +916,7 @@
         codec_id = CODEC_ID_VC1;
         break;
     case STREAM_TYPE_AUDIO_AAC:
+    case STREAM_TYPE_AUDIO_AAC2:
         codec_type = CODEC_TYPE_AUDIO;
         codec_id = CODEC_ID_AAC;
         break;
Index: libavformat/mpegts.h
===================================================================
--- libavformat/mpegts.h	(revision 10910)
+++ libavformat/mpegts.h	(working copy)
@@ -49,6 +49,7 @@
 #define STREAM_TYPE_PRIVATE_SECTION 0x05
 #define STREAM_TYPE_PRIVATE_DATA    0x06
 #define STREAM_TYPE_AUDIO_AAC       0x0f
+#define STREAM_TYPE_AUDIO_AAC2      0x11
 #define STREAM_TYPE_VIDEO_MPEG4     0x10
 #define STREAM_TYPE_VIDEO_H264      0x1b
 #define STREAM_TYPE_VIDEO_VC1       0xea

Reply via email to