On Tuesday 21 June 2011 19:32:02 Dan Dennedy wrote:
> >
> > melt -profile dv_pal test.mlt colour:blue
> >
> > Expected behaviour: we should first see a letterboxed 16:9 red clip, then
> > a blue clip with normal 4:3 PAL ratio.
> >
> > But in fact, the blue clip appears with 16:9 aspect ratio, the profile
> > from the .mlt file seems to have corrupted our PAL DV profile.
>
> The loader producer is supposed to detect this situation (xml producer
> changes explicit profile), insert a consumer producer, and restore the
> explicit profile.
Ok, I see. Patch below fixes the issue, but probably leaks a profile...
but maybe it helps for a better solution
regards
jb
diff --git a/src/modules/core/producer_loader.c
b/src/modules/core/producer_loader.c
index 2600b62..35abc04 100644
--- a/src/modules/core/producer_loader.c
+++ b/src/modules/core/producer_loader.c
@@ -95,12 +95,12 @@ static mlt_producer create_producer( mlt_profile profile,
char *file )
{
char *name = mlt_properties_get_name( dictionary, i );
if ( fnmatch( name, lookup, 0 ) == 0 )
- result = create_from( profile, file,
mlt_properties_get_value(
dictionary, i ) );
+ result = create_from( backup_profile, file,
mlt_properties_get_value( dictionary, i ) );
}
// Check if the producer changed the profile - xml does this.
// The consumer producer does not handle frame rate differences.
- if ( result && backup_profile->is_explicit && (
+ if ( result && profile->is_explicit && (
profile->width != backup_profile->width ||
profile->height != backup_profile->height ||
profile->sample_aspect_num !=
backup_profile->sample_aspect_num ||
@@ -108,22 +108,22 @@ static mlt_producer create_producer( mlt_profile profile,
char *file )
profile->colorspace != backup_profile->colorspace ) )
{
// Restore the original profile attributes.
- profile->display_aspect_den =
backup_profile->display_aspect_den;
- profile->display_aspect_num =
backup_profile->display_aspect_num;
- profile->frame_rate_den =
backup_profile->frame_rate_den;
- profile->frame_rate_num =
backup_profile->frame_rate_num;
- profile->height = backup_profile->height;
- profile->progressive = backup_profile->progressive;
- profile->sample_aspect_den =
backup_profile->sample_aspect_den;
- profile->sample_aspect_num =
backup_profile->sample_aspect_num;
- profile->width = backup_profile->width;
+ backup_profile->display_aspect_den =
profile->display_aspect_den;
+ backup_profile->display_aspect_num =
profile->display_aspect_num;
+ backup_profile->frame_rate_den =
profile->frame_rate_den;
+ backup_profile->frame_rate_num =
profile->frame_rate_num;
+ backup_profile->height = profile->height;
+ backup_profile->progressive = profile->progressive;
+ backup_profile->sample_aspect_den =
profile->sample_aspect_den;
+ backup_profile->sample_aspect_num =
profile->sample_aspect_num;
+ backup_profile->width = profile->width;
// Use the 'consumer' producer.
mlt_producer_close( result );
- result = mlt_factory_producer( profile, "consumer",
file );
+ result = mlt_factory_producer( backup_profile,
"consumer", file );
}
- mlt_profile_close( backup_profile );
+ //mlt_profile_close( backup_profile );
free( lookup );
}
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Mlt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mlt-devel