assert(buffer);
ADM_assert(buffer);
void A_saveBunchJpg(char *name){  ffmpegEncoderFFMjpeg *codec=NULL;  uint32_t sz,fl;  FILE *fd;  uint8_t *buffer=NULL;  uint8_t *src=NULL;  uint32_t curImg;  char	 fullName[2048],*ext;  	if(frameStart>frameEnd)		{			GUI_Alert("Set markers correctly!");			return;		}	// Split name into base + extension	PathSplit(name,&name,&ext);			sz = avifileinfo->width* avifileinfo->height * 3;	buffer=new uint8_t [sz];	assert(buffer);	src=new uint8_t [sz];	assert(src);		codec=new  ffmpegEncoderFFMjpeg( avifileinfo->width,avifileinfo->height,FF_MJPEG)  ;		codec->init( 95,25000);			for(curImg=frameStart;curImg<=frameEnd;curImg++)	{				if (!video_body->getUncompressedFrame (curImg, src))		{			GUI_Alert("Cannot uncompress video!");			goto _bunch_abort;		}		if(!codec->encode(src,				 	buffer,					&sz,					&fl))			{				GUI_Alert("Problem encoding that frame!");				goto _bunch_abort;							}		sprintf(fullName,"%s%04d.jpg",name,curImg-frameStart);		fd=fopen(fullName,"wb");		if(!fd)		{				GUI_Alert("Problem writing file!");				goto _bunch_abort;		}		fwrite (buffer, sz, 1, fd);    		fclose(fd);	}	GUI_Alert ("Done.");_bunch_abort:	    	delete [] buffer;	delete [] src;	delete codec;	return ;}