diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-01 02:13:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-01 02:14:46 +0200 |
commit | 859676dd426e7051b41b174886e6e64271e93cdc (patch) | |
tree | a706c2fc7bad29fba2cd0f7ee64e07b1e4dce100 | |
parent | b1ca9642a2a3968a6f6ab80c6d2f1c37e9046d3d (diff) | |
download | ffmpeg-859676dd426e7051b41b174886e6e64271e93cdc.tar.gz |
Insert setdar at the begin of a filter chain instead the end.
This fixes -vf setsar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | ffmpeg.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -3419,9 +3419,12 @@ static void new_video_stream(AVFormatContext *oc, int file_idx) } #if CONFIG_AVFILTER if(frame_aspect_ratio > 0){ + char *tmp; i = vfilters ? strlen(vfilters) : 0; - vfilters = av_realloc(vfilters, i+100); - snprintf(vfilters+i, i+100, "%csetdar=%f\n", i?',':' ', frame_aspect_ratio); + tmp= av_malloc(i+100); + snprintf(tmp, i+100, "setdar=%f%c%s\n", frame_aspect_ratio, i?',':' ', vfilters ? vfilters : ""); + av_freep(&vfilters); + vfilters= tmp; frame_aspect_ratio=0; } |