mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
avformat/mxfdec: rename sub_descriptors as file_descriptors
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
6edcdd2520
commit
447cf53774
@ -203,8 +203,8 @@ typedef struct MXFDescriptor {
|
|||||||
unsigned int color_range;
|
unsigned int color_range;
|
||||||
unsigned int horiz_subsampling;
|
unsigned int horiz_subsampling;
|
||||||
unsigned int vert_subsampling;
|
unsigned int vert_subsampling;
|
||||||
UID *sub_descriptors_refs;
|
UID *file_descriptors_refs;
|
||||||
int sub_descriptors_count;
|
int file_descriptors_count;
|
||||||
int linked_track_id;
|
int linked_track_id;
|
||||||
uint8_t *extradata;
|
uint8_t *extradata;
|
||||||
int extradata_size;
|
int extradata_size;
|
||||||
@ -342,7 +342,7 @@ static void mxf_free_metadataset(MXFMetadataSet **ctx, int freectx)
|
|||||||
av_freep(&((MXFDescriptor *)*ctx)->extradata);
|
av_freep(&((MXFDescriptor *)*ctx)->extradata);
|
||||||
av_freep(&((MXFDescriptor *)*ctx)->mastering);
|
av_freep(&((MXFDescriptor *)*ctx)->mastering);
|
||||||
av_freep(&((MXFDescriptor *)*ctx)->coll);
|
av_freep(&((MXFDescriptor *)*ctx)->coll);
|
||||||
av_freep(&((MXFDescriptor *)*ctx)->sub_descriptors_refs);
|
av_freep(&((MXFDescriptor *)*ctx)->file_descriptors_refs);
|
||||||
break;
|
break;
|
||||||
case Sequence:
|
case Sequence:
|
||||||
av_freep(&((MXFSequence *)*ctx)->structural_components_refs);
|
av_freep(&((MXFSequence *)*ctx)->structural_components_refs);
|
||||||
@ -1201,8 +1201,8 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int
|
|||||||
|
|
||||||
switch(tag) {
|
switch(tag) {
|
||||||
case 0x3F01:
|
case 0x3F01:
|
||||||
return mxf_read_strong_ref_array(pb, &descriptor->sub_descriptors_refs,
|
return mxf_read_strong_ref_array(pb, &descriptor->file_descriptors_refs,
|
||||||
&descriptor->sub_descriptors_count);
|
&descriptor->file_descriptors_count);
|
||||||
case 0x3002: /* ContainerDuration */
|
case 0x3002: /* ContainerDuration */
|
||||||
descriptor->duration = avio_rb64(pb);
|
descriptor->duration = avio_rb64(pb);
|
||||||
break;
|
break;
|
||||||
@ -2071,22 +2071,22 @@ static MXFPackage* mxf_resolve_source_package(MXFContext *mxf, UID package_ul, U
|
|||||||
|
|
||||||
static MXFDescriptor* mxf_resolve_multidescriptor(MXFContext *mxf, MXFDescriptor *descriptor, int track_id)
|
static MXFDescriptor* mxf_resolve_multidescriptor(MXFContext *mxf, MXFDescriptor *descriptor, int track_id)
|
||||||
{
|
{
|
||||||
MXFDescriptor *sub_descriptor = NULL;
|
MXFDescriptor *file_descriptor = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!descriptor)
|
if (!descriptor)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (descriptor->meta.type == MultipleDescriptor) {
|
if (descriptor->meta.type == MultipleDescriptor) {
|
||||||
for (i = 0; i < descriptor->sub_descriptors_count; i++) {
|
for (i = 0; i < descriptor->file_descriptors_count; i++) {
|
||||||
sub_descriptor = mxf_resolve_strong_ref(mxf, &descriptor->sub_descriptors_refs[i], Descriptor);
|
file_descriptor = mxf_resolve_strong_ref(mxf, &descriptor->file_descriptors_refs[i], Descriptor);
|
||||||
|
|
||||||
if (!sub_descriptor) {
|
if (!file_descriptor) {
|
||||||
av_log(mxf->fc, AV_LOG_ERROR, "could not resolve sub descriptor strong ref\n");
|
av_log(mxf->fc, AV_LOG_ERROR, "could not resolve file descriptor strong ref\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (sub_descriptor->linked_track_id == track_id) {
|
if (file_descriptor->linked_track_id == track_id) {
|
||||||
return sub_descriptor;
|
return file_descriptor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (descriptor->meta.type == Descriptor)
|
} else if (descriptor->meta.type == Descriptor)
|
||||||
|
Loading…
Reference in New Issue
Block a user