[FFmpeg-cvslog] Insert setdar at the begin of a filter chain instead the end.
Michael Niedermayer
git at videolan.org
Fri Apr 1 02:29:34 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 1 02:13:51 2011 +0200| [859676dd426e7051b41b174886e6e64271e93cdc] | committer: Michael Niedermayer
Insert setdar at the begin of a filter chain instead the end.
This fixes -vf setsar
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=859676dd426e7051b41b174886e6e64271e93cdc
---
ffmpeg.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 9722655..285b725 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list