[FFmpeg-devel] "Fix" an MXF playback problem
Reimar Döffinger
Reimar.Doeffinger
Wed Sep 19 19:24:13 CEST 2007
Hello,
attached is a patch that "fixes" playback of
http://samples.mplayerhq.hu/MXF/LibDem10secClip.mxf .
It is not really a good solution though, but only a quick hack.
See
http://lists.mplayerhq.hu/pipermail/mplayer-users/2007-September/069201.html
For a explanation what I found out about the problem and why I think
that the file is not compliant.
I moved the temp_package declaration up because it must be reset to NULL
at that place anyway and is not used elsewhere in that function.
Greetings,
Reimar D?ffinger
-------------- next part --------------
Index: libavformat/mxf.c
===================================================================
--- libavformat/mxf.c (revision 10533)
+++ libavformat/mxf.c (working copy)
@@ -694,7 +694,6 @@
static int mxf_parse_structural_metadata(MXFContext *mxf)
{
MXFPackage *material_package = NULL;
- MXFPackage *temp_package = NULL;
int i, j, k;
dprintf(mxf->fc, "metadata sets count %d\n", mxf->metadata_sets_count);
@@ -732,6 +731,7 @@
/* TODO: handle multiple source clips */
for (j = 0; j < material_track->sequence->structural_components_count; j++) {
+ MXFPackage *temp_package = NULL;
/* TODO: handle timecode component */
component = mxf_resolve_strong_ref(mxf, &material_track->sequence->structural_components_refs[j], SourceClip);
if (!component)
@@ -748,7 +748,10 @@
}
if (!source_package) {
av_log(mxf->fc, AV_LOG_ERROR, "material track %d: no corresponding source package found\n", material_track->track_id);
+ if (!temp_package)
break;
+ av_log(mxf->fc, AV_LOG_ERROR, "even if it plays, your file VIOLATES THE SPECIFICATION!\n");
+ source_package = temp_package;
}
for (k = 0; k < source_package->tracks_count; k++) {
if (!(temp_track = mxf_resolve_strong_ref(mxf, &source_package->tracks_refs[k], Track))) {
More information about the ffmpeg-devel
mailing list