[FFmpeg-devel] [PATCH] fix setsar/setdar default
Andrew Wason
rectalogic at rectalogic.com
Sat Feb 18 00:26:03 CET 2012
On Fri, Feb 17, 2012 at 2:47 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>
> where does 0:0 vs 0:1 make a difference ?
When encoding to mov it results in division by 0 because
track->enc->sample_aspect_ratio is 0,0 in mov_write_tapt_tag. See gdb
log:
ffmpeg -i input.mov -vf "scale=576:432,setsar" -codec:v rawvideo
-pix_fmt uyvy422 -tag:v yuvs -an -f mov -y /tmp/out.mov
Program received signal SIGFPE, Arithmetic exception.
0x0000000000a722cd in av_rescale_rnd (a=0, b=576, c=0, rnd=AV_ROUND_NEAR_INF)
at libavutil/mathematics.c:91
91 return (a * b + r)/c;
(gdb) bt
#0 0x0000000000a722cd in av_rescale_rnd (a=0, b=576, c=0,
rnd=AV_ROUND_NEAR_INF) at libavutil/mathematics.c:91
#1 0x0000000000a7244f in av_rescale (a=0, b=576, c=0)
at libavutil/mathematics.c:131
#2 0x00000000004c8487 in mov_write_tapt_tag (pb=0x14fbf40, track=0x1570a40)
at libavformat/movenc.c:1446
#3 0x00000000004c8c75 in mov_write_trak_tag (pb=0x14fbf40, mov=0x14fbea0,
track=0x1570a40, st=0x14f5770) at libavformat/movenc.c:1584
#4 0x00000000004cad2e in mov_write_moov_tag (pb=0x14fbf40, mov=0x14fbea0,
s=0x14fb980) at libavformat/movenc.c:2076
#5 0x00000000004cf191 in mov_write_trailer (s=0x14fb980)
at libavformat/movenc.c:3247
#6 0x0000000000569a10 in av_write_trailer (s=0x14fb980)
at libavformat/utils.c:3420
#7 0x000000000040e3f0 in transcode (output_files=0x14f6330,
nb_output_files=1, input_files=0x14fb270, nb_input_files=1)
at ffmpeg.c:3100
#8 0x0000000000416148 in main (argc=16, argv=0x7fffffffe368) at ffmpeg.c:5146
More information about the ffmpeg-devel
mailing list