vdv
public text v1 · immutablemain ()
{
AVCodec* mjpegCodec;
AVCodecContext* mjpegCodecCtx;
mjpegCodec = avcodec_find_encoder_by_name ("mjpeg");
if (mjpegCodec==NULL)
printf ("MJpeg codec not found\n");
mjpegCodecCtx = avcodec_alloc_context ();
if (mjpegCodecCtx)
if (avcodec_open (mjpegCodecCtx, mjpegCodec)<0)
printf ("Codec not opened\n");
}