comparison opt.c @ 6015:bb4f24c580f5 libavcodec

Add a missing break, before av_set_number would always return NULL for FF_OPT_TYPE_RATIONAL options instead of the corresponding AVOption
author reimar
date Thu, 13 Dec 2007 19:00:53 +0000
parents 853d1ea80942
children 72bb141d9c05
comparison
equal deleted inserted replaced
6014:33b0514769b2 6015:bb4f24c580f5
67 case FF_OPT_TYPE_FLOAT: *(float *)dst= num*intnum/den; break; 67 case FF_OPT_TYPE_FLOAT: *(float *)dst= num*intnum/den; break;
68 case FF_OPT_TYPE_DOUBLE:*(double *)dst= num*intnum/den; break; 68 case FF_OPT_TYPE_DOUBLE:*(double *)dst= num*intnum/den; break;
69 case FF_OPT_TYPE_RATIONAL: 69 case FF_OPT_TYPE_RATIONAL:
70 if((int)num == num) *(AVRational*)dst= (AVRational){num*intnum, den}; 70 if((int)num == num) *(AVRational*)dst= (AVRational){num*intnum, den};
71 else *(AVRational*)dst= av_d2q(num*intnum/den, 1<<24); 71 else *(AVRational*)dst= av_d2q(num*intnum/den, 1<<24);
72 break;
72 default: 73 default:
73 return NULL; 74 return NULL;
74 } 75 }
75 return o; 76 return o;
76 } 77 }