diff --git a/src/video_compress/libavcodec.c b/src/video_compress/libavcodec.c index 13bd6ff84..a4b557389 100644 --- a/src/video_compress/libavcodec.c +++ b/src/video_compress/libavcodec.c @@ -210,7 +210,6 @@ static bool configure_with(struct libav_video_compress *s, struct video_frame *f double avg_bpp; // average bite per pixel // implement multiple tiles support if needed assert(frame->tile_count == 1); - s->saved_desc = video_desc_from_frame(frame); struct video_desc compressed_desc; enum { @@ -433,6 +432,8 @@ static bool configure_with(struct libav_video_compress *s, struct video_frame *f return false; } + s->saved_desc = video_desc_from_frame(frame); + return true; }