[Ffmpeg-cvslog] r5910 - trunk/libavformat/mxf.c
bcoudurier
subversion
Thu Aug 3 14:31:15 CEST 2006
Author: bcoudurier
Date: Thu Aug 3 14:31:15 2006
New Revision: 5910
Modified:
trunk/libavformat/mxf.c
Log:
parse SONY hidden MPEG-4 extradata, fix C0023S01.mxf
Modified: trunk/libavformat/mxf.c
==============================================================================
--- trunk/libavformat/mxf.c (original)
+++ trunk/libavformat/mxf.c Thu Aug 3 14:31:15 2006
@@ -102,6 +102,8 @@
UID *sub_descriptors_refs;
int sub_descriptors_count;
int linked_track_id;
+ uint8_t *extradata;
+ int extradata_size;
} MXFDescriptor;
typedef struct MXFPackage {
@@ -598,6 +600,11 @@
case 0x3401:
mxf_read_metadata_pixel_layout(pb, descriptor);
break;
+ case 0x8201: /* Private tag used by SONY C0023S01.mxf */
+ descriptor->extradata = av_malloc(size);
+ descriptor->extradata_size = size;
+ get_buffer(pb, descriptor->extradata, size);
+ break;
default:
url_fskip(pb, size);
}
@@ -815,6 +822,10 @@
/* TODO: drop PictureEssenceCoding and SoundEssenceCompression, only check EssenceContainer */
codec_ul = mxf_get_codec_ul(mxf_codec_uls, &descriptor->essence_codec_ul);
st->codec->codec_id = codec_ul->id;
+ if (descriptor->extradata) {
+ st->codec->extradata = descriptor->extradata;
+ st->codec->extradata_size = descriptor->extradata_size;
+ }
if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
container_ul = mxf_get_codec_ul(mxf_picture_essence_container_uls, &descriptor->essence_container_ul);
if (st->codec->codec_id == CODEC_ID_NONE)
More information about the ffmpeg-cvslog
mailing list