Philip de Nier <[email protected]> added the comment:
Patch #3:
Read the component depth from the descriptor and removed incorrect assignment of
(audio) bits_per_sample to video stream data.
_____________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/roundup/ffmpeg/issue1470>
_____________________________________________________
Index: libavformat/mxfdec.c
===================================================================
--- libavformat/mxfdec.c (revision 21481)
+++ libavformat/mxfdec.c (working copy)
@@ -96,6 +96,7 @@
int height;
int channels;
int bits_per_sample;
+ int component_depth;
UID *sub_descriptors_refs;
int sub_descriptors_count;
int linked_track_id;
@@ -589,6 +590,9 @@
case 0x3401:
mxf_read_pixel_layout(pb, descriptor);
break;
+ case 0x3301:
+ descriptor->component_depth = get_be32(pb);
+ break;
default:
/* Private uid used by SONY C0023S01.mxf */
if (IS_KLV_KEY(uid, mxf_sony_mpeg4_extradata)) {
@@ -801,7 +805,6 @@
st->codec->codec_id = container_ul->id;
st->codec->width = descriptor->width;
st->codec->height = descriptor->height;
- st->codec->bits_per_coded_sample = descriptor->bits_per_sample; /* Uncompressed */
st->need_parsing = AVSTREAM_PARSE_HEADERS;
} else if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
container_ul = mxf_get_codec_ul(mxf_essence_container_uls, essence_container_ul);