The dynamic resoltuion change occurs when he decoder detects a coded frame with one or more of the following parameters different from those previously established (and reflected by corresponding queries): 1. coded resolution (OUTPUT width and height) 2. visible resolution (selection rectangles) 3. the minimum number of buffers needed for decoding 4. bit-depth of the bitstream has been changed
when the bit-depth is changed, the pixel format will be changed, so the format is changed after a source change event, we should handle it and reinit the capture queue. Signed-off-by: Ming Qian <ming.q...@nxp.com> --- libavcodec/v4l2_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c index a181f884d2a6..0a0f5b226960 100644 --- a/libavcodec/v4l2_context.c +++ b/libavcodec/v4l2_context.c @@ -85,9 +85,11 @@ static inline unsigned int v4l2_resolution_changed(V4L2Context *ctx, struct v4l2 { struct v4l2_format *fmt1 = &ctx->format; int ret = V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? + fmt1->fmt.pix_mp.pixelformat != fmt2->fmt.pix_mp.pixelformat || fmt1->fmt.pix_mp.width != fmt2->fmt.pix_mp.width || fmt1->fmt.pix_mp.height != fmt2->fmt.pix_mp.height : + fmt1->fmt.pix.pixelformat != fmt2->fmt.pix.pixelformat || fmt1->fmt.pix.width != fmt2->fmt.pix.width || fmt1->fmt.pix.height != fmt2->fmt.pix.height; -- 2.33.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".