Hello, mpeg2_metadata currently has a bug wrt its handling of the colour_description elements in case the input already had a sequence_display_extension, but with colour_description set to zero. Then the colour_description elements are zero at the end of the read process; but zero is a forbidden value for these elements (probably due to start code emulation). If mpeg2_metadata now adds the colour_description elements because the user requested one of them to be set, the others will remain zero.
On the other hand, if there was no sequence_display_extension to begin with, the values not requested to be set are set to twice to the value indicating unspecified. Also included is a check for some invalid values (like the value zero for the colour_description elements). This recycles an old patch from last December that was ultimately ignored. Furthermore, the cbs_mpeg2 returned the wrong error codes in case something isn't implemented. - Andreas PS: Is there interest in discarding unnecessary trailing zeroes at the end of mpeg2 slices similarly to how its done in H2645? Andreas Rheinhardt (4): cbs_mpeg2: Correct and use enum values cbs_mpeg2: Improve checks for invalid values mpeg2_metadata, cbs_mpeg2: Fix handling of colour_description cbs_mpeg2: Correct error codes libavcodec/cbs_mpeg2.c | 53 +++++++++++++++----------- libavcodec/cbs_mpeg2.h | 2 +- libavcodec/cbs_mpeg2_syntax_template.c | 28 ++++++++------ libavcodec/mpeg2_metadata_bsf.c | 18 ++++++--- 4 files changed, 59 insertions(+), 42 deletions(-) -- 2.21.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".