aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-08-03 12:31:15 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-08-03 12:31:15 +0000
commite1dacee11e1d9eee2eef82890a09557d78a35c3d (patch)
treebb2f864a54c407dba11b02db0903af3e6abec2e1
parent61ca932e4aa544d9f4e1ae8cf58f62b081747003 (diff)
downloadffmpeg-e1dacee11e1d9eee2eef82890a09557d78a35c3d.tar.gz
parse SONY hidden MPEG-4 extradata, fix C0023S01.mxf
Originally committed as revision 5910 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mxf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/mxf.c b/libavformat/mxf.c
index fd934c5df6..67649ae88e 100644
--- a/libavformat/mxf.c
+++ b/libavformat/mxf.c
@@ -102,6 +102,8 @@ typedef struct MXFDescriptor {
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 @@ static int mxf_read_metadata_generic_descriptor(MXFContext *mxf, KLVPacket *klv)
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 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
/* 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)