[vlc-devel] [PATCH 1/2] avcommon: don't overwrite the AVCodecContext values from undefined VLC values
Steve Lhomme
robux4 at ycbcr.xyz
Wed Dec 12 14:58:18 CET 2018
---
modules/codec/avcodec/avcommon.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h
index ab6e7e72e3..e27a951cad 100644
--- a/modules/codec/avcodec/avcommon.h
+++ b/modules/codec/avcodec/avcommon.h
@@ -157,6 +157,8 @@ static inline void set_video_color_settings( const video_format_t *p_fmt, AVCode
case COLOR_SPACE_BT2020:
p_context->colorspace = AVCOL_SPC_BT2020_CL;
break;
+ case COLOR_SPACE_UNDEF: /* do nothing */
+ break;
default:
p_context->colorspace = AVCOL_SPC_UNSPECIFIED;
break;
@@ -185,6 +187,8 @@ static inline void set_video_color_settings( const video_format_t *p_fmt, AVCode
case TRANSFER_FUNC_SMPTE_240:
p_context->color_trc = AVCOL_TRC_SMPTE240M;
break;
+ case TRANSFER_FUNC_UNDEF: /* do nothing */
+ break;
default:
p_context->color_trc = AVCOL_TRC_UNSPECIFIED;
break;
@@ -206,6 +210,8 @@ static inline void set_video_color_settings( const video_format_t *p_fmt, AVCode
case COLOR_PRIMARIES_FCC1953:
p_context->color_primaries = AVCOL_PRI_BT470M;
break;
+ case COLOR_PRIMARIES_UNDEF: /* do nothing */
+ break;
default:
p_context->color_primaries = AVCOL_PRI_UNSPECIFIED;
break;
@@ -230,6 +236,8 @@ static inline void set_video_color_settings( const video_format_t *p_fmt, AVCode
case CHROMA_LOCATION_BOTTOM_CENTER:
p_context->chroma_sample_location = AVCHROMA_LOC_BOTTOM;
break;
+ case CHROMA_LOCATION_UNDEF: /* do nothing */
+ break;
default:
p_context->chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED;
break;
--
2.17.1
More information about the vlc-devel
mailing list