[FFmpeg-devel] [PATCH] lavf/matroskaenc: use integers to for display size.
Michael Niedermayer
michaelni at gmx.at
Wed Dec 12 17:48:47 CET 2012
On Sat, Dec 08, 2012 at 11:57:06AM +0100, Nicolas George wrote:
> Avoid rounding differences between x86_32 and x86_64.
> Fix trac ticket #1997.
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> libavformat/matroskaenc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index 2a8a2ea..adca74f 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -637,7 +637,7 @@ static int mkv_write_tracks(AVFormatContext *s)
> }
>
> if (st->sample_aspect_ratio.num) {
> - int d_width = codec->width*av_q2d(st->sample_aspect_ratio);
> + int d_width = av_rescale(codec->width, st->sample_aspect_ratio.num, st->sample_aspect_ratio.den);
the patch is ok
but both versions are wrong
a subsequent patch or other should add overflow checks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121212/9e9dd79a/attachment.asc>
More information about the ffmpeg-devel
mailing list