On 2014-08-14 23:18, Luca Barbato wrote:
On 14/08/14 22:11, Tomas Härdin wrote:
On Wed, 2014-08-13 at 19:37 +0200, Luca Barbato wrote:
On 13/08/14 19:15, Anton Khirnov wrote:
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 410c13b..eb0f5d0 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -972,6 +972,7 @@ static const MXFCodecUL mxf_sound_essence_container_uls[] = 
{
      { { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x04,0x40,0x01 
}, 14,       AV_CODEC_ID_MP2 }, /* MPEG-ES Frame wrapped, 0x40 ??? stream id */
      { { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x01,0x01,0x01 
}, 14, AV_CODEC_ID_PCM_S16LE }, /* D-10 Mapping 50Mbps PAL Extended Template */
      { { 
0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0xff,0x4b,0x46,0x41,0x41,0x00,0x0d,0x4d,0x4F 
}, 14, AV_CODEC_ID_PCM_S16LE }, /* 0001GL00.MXF.A1.mxf_opatom.mxf */
+    { { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x03,0x04,0x02,0x02,0x02,0x03,0x03,0x01,0x00 
}, 14,       AV_CODEC_ID_AAC }, /* MPEG2 AAC ADTS (legacy) */
      { { 
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 
},  0,      AV_CODEC_ID_NONE },
  };
@@ -1822,6 +1823,7 @@ static const MXFMetadataReadTableEntry mxf_metadata_read_table[] = {
      { { 
0x06,0x0e,0x2b,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x48,0x00 
}, mxf_read_generic_descriptor, sizeof(MXFDescriptor), Descriptor }, /* Wave */
      { { 
0x06,0x0e,0x2b,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x47,0x00 
}, mxf_read_generic_descriptor, sizeof(MXFDescriptor), Descriptor }, /* AES3 */
      { { 
0x06,0x0e,0x2b,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x5c,0x00 
}, mxf_read_generic_descriptor, sizeof(MXFDescriptor), Descriptor }, /* 
VANC/VBI - SMPTE 436M */
+    { { 
0x06,0x0e,0x2b,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x5e,0x00 
}, mxf_read_generic_descriptor, sizeof(MXFDescriptor), Descriptor }, /* 
MPEG2AudioDescriptor */
      { { 
0x06,0x0e,0x2b,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x3A,0x00 
}, mxf_read_track, sizeof(MXFTrack), Track }, /* Static Track */
      { { 
0x06,0x0e,0x2b,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x3B,0x00 
}, mxf_read_track, sizeof(MXFTrack), Track }, /* Generic Track */
      { { 
0x06,0x0e,0x2b,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x04,0x01,0x02,0x02,0x00,0x00 
}, mxf_read_cryptographic_context, sizeof(MXFCryptoContext), CryptoContext },
@@ -2413,7 +2415,8 @@ static int mxf_read_packet_old(AVFormatContext *s, 
AVPacket *pkt)
                       * < PTS if low_delay = 0 (Sony IMX30) */
                      pkt->pts = mxf->current_edit_unit;
                  }
-            } else if (codec->codec_type == AVMEDIA_TYPE_AUDIO) {
+            } else if (codec->codec_type == AVMEDIA_TYPE_AUDIO &&
+                       codec->codec_id != AV_CODEC_ID_AAC) {
The commit message should mention the reason for this
I think that way to calculate pts works only for pcm btw. Anybody has an
mxf with something different inside?
Checking if it's a PCM codec should be fine (assuming it passes FATE of
course).
I extended the check since the soundessence contains the
bits_per_coded_sample information (see the new patch)

There's codec ULs for AC3 and MP2 too - are there corresponding FATE
samples for those?
Sadly not =/ Do you have some handy? I'd like to have a second look at
the whole function behaviour.

Nope, I'm afraid not :/ Maybe one could be created with mxfwrap? See http://sourceforge.net/projects/mxflib/

/Tomas
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to