[FFmpeg-devel] [PATCH] ffprobe: Eliminate pointless union in unit_value struct
Stefano Sabatini
stefasab at gmail.com
Fri Sep 14 10:32:12 CEST 2012
On date Thursday 2012-09-13 10:46:03 -0400, Derek Buitenhuis encoded:
> On 13/09/2012 3:02 AM, Stefano Sabatini wrote:
> > Check attached patches.
>
> [...]
>
> > Subject: [PATCH] ffprobe: avoid potentially lossy long long int -> double
> > cast in value_string()
> >
> > Previously the cast long long int -> double was always performed (and
> > then the double was converted back to long long int) even when it was
> > avoidable.
>
> Seems OK. Perhaps it would make also more sense to also use an int for the
> hrs/min/secs calculations, which is also currently using a double for some
> reason.
Uhm no, when unit_second_str is used, the value is already expressed
as a floating point value, so there is no point in converting it to an
integer.
> > Subject: [PATCH] ffprobe: kill initializer with nested union field definition
> >
> > The c99-to-c89 converter (for MSVC support) doesn't currently handle
> > designated initializers or compound literals with nested unions or
> > structs.
> >
> > This is apparently the only place where this construct is used in the
> > FFmpeg codebase.
>
> This seems OK.
I'll apply both patches soon, thanks.
--
FFmpeg = Frightening and Formidable Mega Proud Elected Goblin
More information about the ffmpeg-devel
mailing list