id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc	blockedby	blocking	reproduced	analyzed
398	ffplay does not initialize dar/sar for scale filter	rectalogic		"The 'sar' and 'dar' expressions available in the scale filter are not initialized properly in ffplay. I have a sample video sar43.mpg (download from http://www.box.net/shared/jdtkdlhsvres106e157z) that is 1440x1080 with SAR of 4:3 and so DAR of 16:9. When the scale filter expression is parsed, 'sar' is 1 and 'dar' is 1.333 (4:3) because inlink->sample_aspect_ratio is {0,1} instead of {4,3}.

gdb info from breakpoint in libavfilter/vf_scale.c:config_props()
{{{
(gdb) p var_values[VAR_SAR]
$32 = 1
(gdb) p var_values[VAR_DAR]
$33 = 1.3333333730697632
(gdb) p inlink->sample_aspect_ratio
$34 = {num = 0, den = 1}
}}}
ffplay output:
{{{
$ ./ffplay -vf scale=600*dar:600 /storage/test/mencoder/sar43.mpg
ffplay version N-31895-gee5234d, Copyright (c) 2003-2011 the FFmpeg developers
  built on Aug 14 2011 23:40:42 with gcc 4.4.3
  configuration: --enable-debug=gdb3 --disable-optimizations --disable-asm --disable-stripping
  libavutil    51. 12. 0 / 51. 12. 0
  libavcodec   53. 10. 0 / 53. 10. 0
  libavformat  53.  7. 0 / 53.  7. 0
  libavdevice  53.  3. 0 / 53.  3. 0
  libavfilter   2. 31. 1 /  2. 31. 1
  libswscale    2.  0. 0 /  2.  0. 0
Input #0, mpeg, from '/storage/test/mencoder/sar43.mpg':
  Duration: 00:00:03.06, start: 0.157667, bitrate: 27326 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video (Main), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], 28000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
[scale @ 0x2897e60] w:1440 h:1080 fmt:yuv420p -> w:800 h:600 fmt:yuv420p flags:0x4
}}}
I think ffplay needs to insert a 'buffer' filter before 'scale' like ffmpeg does?"	defect	closed	normal	avfilter	git-master	fixed					1	1
