Skip to content
Snippets Groups Projects
Commit 4754d70a authored by Paul B Mahol's avatar Paul B Mahol
Browse files

avfilter/video: pick sar from link


It should not be needed for each filter that sets sample aspect ratio
to set it explicitly also for each and every frame, instead that is
automatically done in get_buffer call.

Signed-off-by: default avatarPaul B Mahol <onemda@gmail.com>
parent d02289c3
No related branches found
No related tags found
No related merge requests found
...@@ -43,6 +43,7 @@ AVFrame *ff_null_get_video_buffer(AVFilterLink *link, int w, int h) ...@@ -43,6 +43,7 @@ AVFrame *ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h) AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
{ {
AVFrame *frame = NULL;
int pool_width = 0; int pool_width = 0;
int pool_height = 0; int pool_height = 0;
int pool_align = 0; int pool_align = 0;
...@@ -86,7 +87,13 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h) ...@@ -86,7 +87,13 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
} }
} }
return ff_frame_pool_get(link->frame_pool); frame = ff_frame_pool_get(link->frame_pool);
if (!frame)
return NULL;
frame->sample_aspect_ratio = link->sample_aspect_ratio;
return frame;
} }
AVFrame *ff_get_video_buffer(AVFilterLink *link, int w, int h) AVFrame *ff_get_video_buffer(AVFilterLink *link, int w, int h)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment