+ pgm->duration = 0;
+ for( int jj=0; jj<streams.size(); ++jj ) {
+ AVStream *st = fmt_ctx->streams[jj];
+ AVMediaType type = st->codec->codec_type;
+ switch( type ) {
+ case AVMEDIA_TYPE_VIDEO:
+ case AVMEDIA_TYPE_AUDIO:
+ break;
+ default:
+ continue;
+ }