- avpicture_layout((AVPicture *)in_data, avccontext->pix_fmt,
- avccontext->width, avccontext->height,
- in_frame->components[0].data,
- p_schro_params->frame_size);
+ if (in_frame)
+ avpicture_layout((AVPicture *)in_data, avccontext->pix_fmt,
+ avccontext->width, avccontext->height,
+ in_frame->components[0].data,
+ p_schro_params->frame_size);