Insert setdar at the begin of a filter chain instead the end.
This fixes -vf setsar Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b1ca9642a2
commit
859676dd42
1 changed files with 5 additions and 2 deletions
7
ffmpeg.c
7
ffmpeg.c
|
@ -3419,9 +3419,12 @@ static void new_video_stream(AVFormatContext *oc, int file_idx)
|
||||||
}
|
}
|
||||||
#if CONFIG_AVFILTER
|
#if CONFIG_AVFILTER
|
||||||
if(frame_aspect_ratio > 0){
|
if(frame_aspect_ratio > 0){
|
||||||
|
char *tmp;
|
||||||
i = vfilters ? strlen(vfilters) : 0;
|
i = vfilters ? strlen(vfilters) : 0;
|
||||||
vfilters = av_realloc(vfilters, i+100);
|
tmp= av_malloc(i+100);
|
||||||
snprintf(vfilters+i, i+100, "%csetdar=%f\n", i?',':' ', frame_aspect_ratio);
|
snprintf(tmp, i+100, "setdar=%f%c%s\n", frame_aspect_ratio, i?',':' ', vfilters ? vfilters : "");
|
||||||
|
av_freep(&vfilters);
|
||||||
|
vfilters= tmp;
|
||||||
frame_aspect_ratio=0;
|
frame_aspect_ratio=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue