Le 27/04/2023 à 14:45, Tomas Hardin a écrit : >> static inline uint16_t rescale_mastering_chroma(AVRational q) >> { >> @@ -1260,7 +1305,6 @@ static int64_t >> mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID >> f1 *= 2; >> } >> >> - > Stray deleted line > >> + /* Image components number */ >> + mxf_write_local_tag(s, 2, 0x840A); >> + avio_wb16(pb, component_count); >> + /* Array of picture components where each component comprises 3 > Looks like you missed a space there (: > >> + /* Extract usefull size infromation from the SIZ marker */ >> + if (bytestream2_get_be16u(&g) != JPEG2000_SIZ) { >> + av_log(s, AV_LOG_ERROR, "SIZ marker not present\n"); >> + return 0; >> + } >> + bytestream2_skip(&g, 2); // Skip Lsiz >> + sc->j2k_cap = bytestream2_get_be16u(&g); >> + sc->j2k_xsiz = bytestream2_get_be32u(&g); >> + sc->j2k_ysiz = bytestream2_get_be32u(&g); >> + sc->j2k_x0siz = bytestream2_get_be32u(&g); >> + sc->j2k_y0siz = bytestream2_get_be32u(&g); >> + sc->j2k_xtsiz = bytestream2_get_be32u(&g); >> + sc->j2k_ytsiz = bytestream2_get_be32u(&g); >> + sc->j2k_xt0siz = bytestream2_get_be32u(&g); >> + sc->j2k_yt0siz = bytestream2_get_be32u(&g); >> + j2k_ncomponents = bytestream2_get_be16u(&g); >> + if (j2k_ncomponents != component_count) { >> + av_log(s, AV_LOG_WARNING, "Incoherence about components >> image number.\n"); > Erroring out here seems more appropriate. > > /Tomas > > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". I've attached to this mail the new patch taking into account the 3 remarks above. Regards Cédric