diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-01-28 15:29:01 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-01-28 15:29:44 +0100 |
commit | 3a72574c59460309fbd0ecd5c537779265cc93af (patch) | |
tree | e4f00830783079e74458d7f57ce5e615a7b8c547 /gst | |
parent | 87031b14cb38075fe3ed168d477f1b682de92268 (diff) |
mxfmetadata: Add workaround for ffmpeg only writing one Video Line Map value
https://ffmpeg.org/pipermail/ffmpeg-devel/2016-January/188202.html
Diffstat (limited to 'gst')
-rw-r--r-- | gst/mxf/mxfmetadata.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gst/mxf/mxfmetadata.c b/gst/mxf/mxfmetadata.c index 758d0e331..786a6769f 100644 --- a/gst/mxf/mxfmetadata.c +++ b/gst/mxf/mxfmetadata.c @@ -4424,15 +4424,25 @@ mxf_metadata_generic_picture_essence_descriptor_handle_tag (MXFMetadataBase * if (GST_READ_UINT32_BE (tag_data) == 0) return TRUE; - if (GST_READ_UINT32_BE (tag_data) != 2 && - GST_READ_UINT32_BE (tag_data + 4) != 4) + if (GST_READ_UINT32_BE (tag_data + 4) != 4) goto error; - if (tag_size != 16) + if (GST_READ_UINT32_BE (tag_data) != 1 && + GST_READ_UINT32_BE (tag_data) != 2) + goto error; + + if ((GST_READ_UINT32_BE (tag_data) == 1 && tag_size != 12) || + (GST_READ_UINT32_BE (tag_data) == 2 && tag_size != 16)) goto error; self->video_line_map[0] = GST_READ_UINT32_BE (tag_data + 8); - self->video_line_map[1] = GST_READ_UINT32_BE (tag_data + 12); + + /* Workaround for files created by ffmpeg */ + if (GST_READ_UINT32_BE (tag_data) == 1) + self->video_line_map[0] = 0; + else + self->video_line_map[1] = GST_READ_UINT32_BE (tag_data + 12); + GST_DEBUG (" video line map = {%i, %i}", self->video_line_map[0], self->video_line_map[1]); break; |