[FFmpeg-devel] [PATCH] ffprobe: Eliminate pointless union in unit_value struct

Derek Buitenhuis derek.buitenhuis at gmail.com
Thu Sep 13 16:46:03 CEST 2012

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

> 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. 

- Derek

More information about the ffmpeg-devel mailing list