- av_register_all();
- if(av_open_input_file(&pFormatCtx, filename, NULL, 0, NULL)!=0)
- printf("error!\n");
- if(av_find_stream_info(pFormatCtx)<0)
- printf("error!\n");
- videoStream=-1;
- for(i=0; i<pFormatCtx->nb_streams; i++)
- if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO)
- {
- videoStream=i;
- break;
- &nbs