On Sun, May 01, 2011 at 01:01:30AM +0200, Stefano Sabatini wrote:
On date Sunday 2011-05-01 00:27:06 +0200, Michael Niedermayer wrote:
ffmpeg | branch: master | Michael Niedermayer <michaelni@gmx.at> | Sun May 1 00:21:56 2011 +0200| [ffb5a0d533498102c31aa131bc91a4cce868b0a8] | committer: Michael Niedermayer
Merge commit '85770f2a2651497861ed938efcd0df3696ff5e45'
* commit '85770f2a2651497861ed938efcd0df3696ff5e45': AVOptions: make default_val a union, as proposed in AVOption2. Move ff_dynarray_add to lavu and make it public. lavf: remove duplicate assignment in avformat_alloc_context. lavf: use designated initializers for AVClasses. options: simplify av_find_opt by using av_next_option.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ffb5a0d533498102c3...
Why did you remove .i64 and .q from the default_val union?
short awnser: because it didnt work, it broke fate. more elaborately, i think its a bad idea to have 3 different ways to store a real-scalar value. It leads to problems/confusion and complex code. The problem is quite real (fate failing) and fixing that would lead to complex code with IMHO little solid advantage Its also more error prone as its easy to set the wrong one in the table and theres nothing that would point at that mistake.
For the rational it is more safe/logical not assume sizeof(double) >= sizeof(int64_t), for the second it may be convenient to express a default by using a rational rather than its double representation, for documentation/convenience purposes.
for documentation/convenience one can write dbl=5.0/3.0 in the table
Also I suppose we agreed that public API changes should be posted for review before being pushed.
yes, but this did not seem controversal to me. Adding a string value in addition to double is something that was discussed and something everyone seems to have agreed to be a good idea. But let me ask differently, what should i change on the code? if nothing then IMHO skiping the patch sending wasnt that wrong and if theres something, please tell me, ill fix it. [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Old school: Use the lowest level language in which you can solve the problem conveniently. New school: Use the highest level language in which the latest supercomputer can solve the problem without the user falling asleep waiting.