- if (video_dec_ctx->width != width || video_dec_ctx->height != height ||
- video_dec_ctx->pix_fmt != pix_fmt) {
- /* To handle this change, one could call av_image_alloc again and
- * decode the following frames into another rawvideo file. */
- fprintf(stderr, "Error: Width, height and pixel format have to be "
- "constant in a rawvideo file, but the width, height or "
- "pixel format of the input video changed:\n"
- "old: width = %d, height = %d, format = %s\n"
- "new: width = %d, height = %d, format = %s\n",
- width, height, av_get_pix_fmt_name(pix_fmt),
- video_dec_ctx->width, video_dec_ctx->height,
- av_get_pix_fmt_name(video_dec_ctx->pix_fmt));
- return -1;
- }