Message ID | 20200825135009.416297-1-derek.buitenhuis@gmail.com |
---|---|
State | Accepted |
Commit | 649a6969f75f2378c65768deb9debd325eb2fc7f |
Headers | show |
Series | [FFmpeg-devel] avcodec/libdav1d: Call ff_set_sar in addition to setting the frame SAR | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On 8/25/2020 10:50 AM, Derek Buitenhuis wrote: > Similar to what we do in libaomdec.c. > > Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> > --- > libavcodec/libdav1d.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c > index fd801c6fd5..3af7ef4edc 100644 > --- a/libavcodec/libdav1d.c > +++ b/libavcodec/libdav1d.c > @@ -274,6 +274,7 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) > frame->height * (int64_t)p->frame_hdr->render_width, > frame->width * (int64_t)p->frame_hdr->render_height, > INT_MAX); > + ff_set_sar(c, frame->sample_aspect_ratio); I suppose this can't fail if frame->sample_aspect_ratio came out of the av_rescale() above, right? If so LGTM. > > switch (p->seq_hdr->chr) { > case DAV1D_CHR_VERTICAL: >
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index fd801c6fd5..3af7ef4edc 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@ -274,6 +274,7 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) frame->height * (int64_t)p->frame_hdr->render_width, frame->width * (int64_t)p->frame_hdr->render_height, INT_MAX); + ff_set_sar(c, frame->sample_aspect_ratio); switch (p->seq_hdr->chr) { case DAV1D_CHR_VERTICAL:
Similar to what we do in libaomdec.c. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> --- libavcodec/libdav1d.c | 1 + 1 file changed, 1 insertion(+)