[FFmpeg-cvslog] options_table: fix colorspace minimum option value
Jon Morley
git at videolan.org
Tue Dec 2 22:49:39 CET 2014
ffmpeg | branch: master | Jon Morley <jon at tweaksoftware.com> | Mon Nov 10 10:43:42 2014 -0800| [26e20dfd06ac62da596a9549867f990f1200a04e] | committer: Vittorio Giovara
options_table: fix colorspace minimum option value
The min value for colorspace should be zero and not one since the first
valid index into the frame colorspace array is AVCOL_SPC_RGB which is 0.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=26e20dfd06ac62da596a9549867f990f1200a04e
---
libavcodec/options_table.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 2cf82e6..91d7ff9 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -416,7 +416,7 @@ static const AVOption avcodec_options[] = {
{"iec61966_2_1", "IEC 61966-2-1", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_IEC61966_2_1 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"},
{"bt2020_10bit", "BT.2020 - 10 bit", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_BT2020_10 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"},
{"bt2020_12bit", "BT.2020 - 12 bit", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_BT2020_12 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"},
-{"colorspace", "color space", OFFSET(colorspace), AV_OPT_TYPE_INT, {.i64 = AVCOL_SPC_UNSPECIFIED }, 1, AVCOL_SPC_NB-1, V|E|D, "colorspace_type"},
+{"colorspace", "color space", OFFSET(colorspace), AV_OPT_TYPE_INT, {.i64 = AVCOL_SPC_UNSPECIFIED }, 0, AVCOL_SPC_NB-1, V|E|D, "colorspace_type"},
{"rgb", "RGB", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_RGB }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"},
{"bt709", "BT.709", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT709 }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"},
{"unspecified", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"},
More information about the ffmpeg-cvslog
mailing list