File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,9 @@ const char *mlt_image_color_trc_name(mlt_color_trc trc)
324324mlt_color_trc mlt_image_color_trc_id (const char * name )
325325{
326326 mlt_color_trc c ;
327-
327+ if (name == NULL ) {
328+ return mlt_color_trc_none ;
329+ }
328330 for (c = mlt_color_trc_none ; name && c <= mlt_color_trc_invalid ; c ++ ) {
329331 const char * s = mlt_image_color_trc_name (c );
330332 if (!strcmp (s , name ))
@@ -449,6 +451,9 @@ mlt_color_primaries mlt_image_color_pri_id(const char *name)
449451 mlt_color_pri_invalid };
450452
451453 // Fall back to see if it was specified as a number
454+ if (name == NULL ) {
455+ return mlt_color_pri_none ;
456+ }
452457 int value = strtol (name , NULL , 10 );
453458 if (!value && strcmp (name , "0" ))
454459 value = -1 ; // strtol returned an error;
You can’t perform that action at this time.
0 commit comments