Flush解码源程序

源代码在线查看: main.c

软件大小: 325 K
上传用户: princessmeng
关键词: Flush 解码 源程序
下载地址: 免注册下载 普通下载 VIP

相关代码

								#include 				#include 				#include 				#include 								char buf[16384];				MpglibDecoder *mp;								int main(int argc,char **argv)				{					int size;					char out[8192];					int len,ret;										mp = mpglib_decoder_new();									while(1) {						len = read(0,buf,16384);						if(len 							break;						ret = mpglib_decoder_decode(mp,buf,len,out,8192,&size);						while(ret == MPGLIB_OK) {							write(1,out,size);							ret = mpglib_decoder_decode(mp,NULL,0,out,8192,&size);						}						if(ret == MPGLIB_ERR){							fprintf(stderr,"stream error\n");							exit(1);						}					}								  return 0;								}											

相关资源